﻿        :root {
            --bg-deep: #0a0a0f;
            --bg-card: #12121a;
            --bg-elevated: #1a1a24;
            --bg-input: #0d0d12;
            --gold-primary: #D4A853;
            --gold-light: #E8C875;
            --gold-dark: #B8923F;
            --text-primary: #F5F5F5;
            --text-secondary: #A0A0A0;
            --text-muted: #666;
            --border-subtle: rgba(212, 168, 83, 0.2);
            --border-strong: rgba(212, 168, 83, 0.4);
            --success: #4ade80;
            --success-bg: rgba(74, 222, 128, 0.1);
            --warning: #fbbf24;
            --warning-bg: rgba(251, 191, 36, 0.1);
            --error: #f87171;
            --error-bg: rgba(248, 113, 113, 0.1);
            --info: #60a5fa;
            --info-bg: rgba(96, 165, 250, 0.1);
            --media-accent: #FF6B35;
            --media-bg: rgba(255, 107, 53, 0.1);
            --university-accent: #D4A853;
            --university-bg: rgba(212, 168, 83, 0.1);
        }

        * { margin: 0; padding: 0; box-sizing: border-box; }
        body {
            font-family: 'Inter', 'Source Sans Pro', -apple-system, BlinkMacSystemFont, sans-serif;
            background: var(--bg-deep);
            color: var(--text-primary);
            min-height: 100vh;
            font-size: 15px;
            line-height: 1.5;
        }

        /* ===== LOGIN GATE ===== */
        .login-gate {
            position: fixed;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background: var(--bg-deep);
            display: flex;
            align-items: center;
            justify-content: center;
            z-index: 9999;
        }

        .login-gate.hidden { display: none; }

        .login-container {
            width: 100%;
            max-width: 420px;
            padding: 2rem;
        }

        .login-logo {
            text-align: center;
            margin-bottom: 2.5rem;
        }

        .login-logo svg {
            width: 48px;
            height: 48px;
            color: var(--gold-primary);
            margin-bottom: 1rem;
        }

        .login-logo h1 {
            font-family: 'Cinzel', serif;
            font-size: 1.5rem;
            letter-spacing: 0.2em;
            color: var(--gold-primary);
            margin-bottom: 0.25rem;
        }

        .login-logo p {
            font-size: 0.85rem;
            color: var(--text-secondary);
            letter-spacing: 0.1em;
        }

        .login-box {
            background: var(--bg-card);
            border: 1px solid var(--border-subtle);
            border-radius: 12px;
            padding: 2rem;
        }

        .login-title {
            font-family: 'Space Grotesk', sans-serif;
            font-size: 1rem;
            text-align: center;
            margin-bottom: 1.5rem;
            color: var(--text-primary);
        }

        .login-field {
            margin-bottom: 1.25rem;
        }

        .login-label {
            display: block;
            font-size: 0.75rem;
            text-transform: uppercase;
            letter-spacing: 0.1em;
            color: var(--text-secondary);
            margin-bottom: 0.5rem;
        }

        .login-input {
            width: 100%;
            padding: 0.85rem 1rem;
            background: var(--bg-input);
            border: 1px solid var(--border-subtle);
            border-radius: 6px;
            color: var(--text-primary);
            font-family: 'Space Grotesk', sans-serif;
            font-size: 1rem;
            letter-spacing: 0.15em;
            text-align: center;
            transition: all 0.2s ease;
        }

        .login-input:focus {
            outline: none;
            border-color: var(--gold-primary);
            box-shadow: 0 0 0 3px rgba(212, 168, 83, 0.1);
        }

        .login-input.error {
            border-color: var(--error);
            animation: shake 0.4s ease;
        }

        @keyframes shake {
            0%, 100% { transform: translateX(0); }
            25% { transform: translateX(-8px); }
            75% { transform: translateX(8px); }
        }

        .login-btn {
            width: 100%;
            padding: 0.9rem;
            background: linear-gradient(135deg, var(--gold-primary), var(--gold-dark));
            border: none;
            border-radius: 6px;
            color: var(--bg-deep);
            font-family: 'Space Grotesk', sans-serif;
            font-size: 0.9rem;
            font-weight: 600;
            letter-spacing: 0.1em;
            cursor: pointer;
            transition: all 0.2s ease;
        }

        .login-btn:hover {
            transform: translateY(-2px);
            box-shadow: 0 8px 25px rgba(212, 168, 83, 0.3);
        }

        .login-btn:disabled {
            opacity: 0.5;
            cursor: not-allowed;
            transform: none;
        }

        .login-error {
            margin-top: 1rem;
            padding: 0.75rem;
            background: var(--error-bg);
            border: 1px solid var(--error);
            border-radius: 6px;
            color: var(--error);
            font-size: 0.85rem;
            text-align: center;
            display: none;
        }

        .login-error.visible { display: block; }

        .login-footer {
            margin-top: 1.5rem;
            text-align: center;
            font-size: 0.75rem;
            color: var(--text-muted);
        }

        /* ===== APP CONTAINER ===== */
        .app-container {
            display: none;
            grid-template-columns: 260px 1fr;
            height: 100vh;
            overflow: hidden;
        }
        .list-panel { display: none !important; }

        .app-container.active { display: grid; }

        /* ===== SAVE INDICATOR ===== */
        .save-indicator {
            position: fixed;
            bottom: 1.5rem;
            right: 1.5rem;
            padding: 0.6rem 1rem;
            background: var(--bg-card);
            border: 1px solid var(--border-subtle);
            border-radius: 6px;
            font-size: 0.8rem;
            color: var(--text-secondary);
            display: flex;
            align-items: center;
            gap: 0.5rem;
            z-index: 100;
            transition: all 0.3s ease;
            opacity: 0;
            transform: translateY(10px);
        }

        .save-indicator.visible {
            opacity: 1;
            transform: translateY(0);
        }

        .save-indicator.saving { color: var(--warning); border-color: var(--warning); }
        .save-indicator.saved { color: var(--success); border-color: var(--success); }
        .save-indicator.error { color: var(--error); border-color: var(--error); }

        .save-indicator svg { width: 14px; height: 14px; }

        /* ===== SIDEBAR ===== */
        .sidebar {
            background: var(--bg-card);
            border-right: 1px solid var(--border-subtle);
            display: flex;
            flex-direction: column;
            overflow: hidden;
        }

        .sidebar-header {
            padding: 1.25rem;
            border-bottom: 1px solid var(--border-subtle);
        }

        .logo-row {
            display: flex;
            align-items: center;
            gap: 0.6rem;
            margin-bottom: 0.35rem;
        }

        .logo-row svg { height: 24px; width: 24px; color: var(--gold-primary); }

        .logo-text {
            font-family: 'Space Grotesk', sans-serif;
            font-size: 1rem;
            color: var(--gold-primary);
            letter-spacing: 0.15em;
        }

        .logo-subtitle {
            font-size: 0.7rem;
            color: var(--text-secondary);
            text-transform: uppercase;
            letter-spacing: 0.1em;
        }

        .sidebar-search {
            position: relative;
            margin-top: 0.75rem;
        }
        .sidebar-search-icon {
            position: absolute;
            left: 0.6rem;
            top: 50%;
            transform: translateY(-50%);
            width: 14px;
            height: 14px;
            color: var(--text-muted);
            pointer-events: none;
        }
        .sidebar-search-input {
            width: 100%;
            background: var(--bg-primary);
            border: 1px solid var(--border-subtle);
            border-radius: 6px;
            padding: 0.45rem 2.5rem 0.45rem 2rem;
            font-size: 0.75rem;
            color: var(--text-primary);
            outline: none;
            transition: border-color 0.15s, box-shadow 0.15s;
        }
        .sidebar-search-input::placeholder { color: var(--text-muted); font-size: 0.7rem; }
        .sidebar-search-input:focus {
            border-color: var(--gold-primary);
            box-shadow: 0 0 0 2px rgba(212,168,83,0.15);
        }
        .sidebar-search-kbd {
            position: absolute;
            right: 0.5rem;
            top: 50%;
            transform: translateY(-50%);
            font-size: 0.55rem;
            color: var(--text-muted);
            background: var(--bg-card);
            border: 1px solid var(--border-subtle);
            border-radius: 3px;
            padding: 1px 4px;
            pointer-events: none;
            font-family: system-ui, sans-serif;
        }

        .sidebar-nav { flex: 1; overflow-y: auto; padding: 0.75rem 0; }

        .nav-group { margin-bottom: 1.25rem; }

        .nav-group-title {
            font-family: 'Space Grotesk', 'Inter', sans-serif;
            font-size: 0.65rem;
            font-weight: 600;
            text-transform: uppercase;
            letter-spacing: 0.15em;
            color: var(--text-muted);
            padding: 0.5rem 1.25rem;
        }

        .nav-item {
            display: flex;
            align-items: center;
            gap: 0.65rem;
            padding: 0.6rem 1.25rem;
            color: var(--text-secondary);
            cursor: pointer;
            transition: all 0.15s ease;
            border-left: 2px solid transparent;
            font-family: 'Inter', sans-serif;
            font-size: 0.85rem;
            font-weight: 400;
        }

        .nav-item:hover { background: rgba(255,255,255,0.02); color: var(--text-primary); }
        .nav-item.active { 
            background: var(--university-bg); 
            color: var(--gold-primary); 
            border-left-color: var(--gold-primary); 
        }

        .nav-item svg { width: 18px; height: 18px; opacity: 0.7; flex-shrink: 0; }
        .nav-item.active svg { opacity: 1; }

        .nav-sub-item {
            padding-left: 2.5rem;
            font-size: 0.85rem;
            opacity: 0.85;
        }
        .nav-sub-item.active { opacity: 1; }

        .nav-badge {
            margin-left: auto;
            background: var(--gold-primary);
            color: var(--bg-deep);
            font-size: 0.65rem;
            font-weight: 600;
            padding: 0.1rem 0.45rem;
            border-radius: 8px;
            font-family: 'Space Grotesk', sans-serif;
        }

        .nav-badge.media { background: var(--media-accent); }
        .nav-badge.success { background: var(--success); }
        .nav-badge.warning { background: var(--warning); color: var(--bg-deep); }
        .nav-badge.unread { background: var(--error); animation: pulse 2s infinite; }

        @keyframes pulse {
            0%, 100% { opacity: 1; }
            50% { opacity: 0.6; }
        }

        /* ─── Pipeline Indicator ─────────────────────────── */
        .pipeline-indicator {
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 0;
            padding: 0.7rem 1rem;
            border-bottom: 1px solid var(--border-subtle);
        }

        .pipeline-step {
            display: flex;
            flex-direction: column;
            align-items: center;
            gap: 3px;
            cursor: pointer;
            padding: 2px 6px;
            border-radius: 4px;
            transition: all 0.15s ease;
        }

        .pipeline-step:hover { background: rgba(255,255,255,0.04); }

        .pipeline-dot {
            width: 8px;
            height: 8px;
            border-radius: 50%;
            border: 1.5px solid var(--text-muted);
            transition: all 0.2s ease;
        }

        .pipeline-step.active .pipeline-dot {
            background: var(--gold-primary);
            border-color: var(--gold-primary);
            box-shadow: 0 0 6px rgba(212,168,83,0.4);
        }

        .pipeline-step span {
            font-size: 0.55rem;
            text-transform: uppercase;
            letter-spacing: 0.08em;
            color: var(--text-muted);
            transition: color 0.15s ease;
        }

        .pipeline-step.active span { color: var(--gold-primary); }
        .pipeline-step:hover span { color: var(--text-secondary); }

        .pipeline-step.completed .pipeline-dot {
            background: var(--gold-primary);
            border-color: var(--gold-primary);
            opacity: 0.5;
        }
        .pipeline-step.completed span { color: var(--gold-primary); opacity: 0.5; }

        .pipeline-connector {
            width: 16px;
            height: 1px;
            background: var(--border-subtle);
            margin: 0 1px;
            margin-bottom: 14px;
        }

        /* ─── Collapsible Nav Groups ────────────────────── */
        .nav-collapsible {
            display: flex;
            align-items: center;
            gap: 0.65rem;
            padding: 0.6rem 1.25rem;
            color: var(--text-secondary);
            cursor: pointer;
            transition: all 0.15s ease;
            border-left: 2px solid transparent;
            font-size: 0.9rem;
        }

        .nav-collapsible:hover { background: rgba(255,255,255,0.02); color: var(--text-primary); }
        .nav-collapsible svg:first-child { width: 18px; height: 18px; opacity: 0.7; flex-shrink: 0; }

        .nav-chevron {
            margin-left: auto;
            width: 14px !important;
            height: 14px !important;
            transition: transform 0.2s ease;
            opacity: 0.4 !important;
        }

        .nav-chevron.rotated { transform: rotate(90deg); }

        .nav-collapse-content {
            max-height: 0;
            overflow: hidden;
            transition: max-height 0.25s ease;
        }

        .nav-collapse-content.open { max-height: 500px; }

        .nav-collapse-content .nav-item {
            padding-left: 2.5rem;
            font-size: 0.85rem;
            opacity: 0.85;
        }

        .nav-collapse-content .nav-item:hover { opacity: 1; }

        .nav-group-title.clickable {
            cursor: pointer;
            display: flex;
            align-items: center;
            transition: color 0.15s ease;
        }

        .nav-group-title.clickable:hover { color: var(--text-secondary); }

        .nav-group-title.clickable .nav-chevron {
            width: 10px !important;
            height: 10px !important;
            margin-left: auto;
        }

        .sidebar-footer {
            padding: 1rem 1.25rem;
            border-top: 1px solid var(--border-subtle);
        }

        .logout-btn {
            width: 100%;
            padding: 0.6rem;
            background: transparent;
            border: 1px solid var(--border-subtle);
            border-radius: 6px;
            color: var(--text-secondary);
            font-family: inherit;
            font-size: 0.8rem;
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 0.5rem;
            transition: all 0.15s ease;
        }

        .logout-btn:hover { border-color: var(--error); color: var(--error); }
        .logout-btn svg { width: 14px; height: 14px; }

        /* ===== LIST PANEL ===== */
        .list-panel {
            background: var(--bg-deep);
            border-right: 1px solid var(--border-subtle);
            display: flex;
            flex-direction: column;
            overflow: hidden;
        }

        .list-header {
            padding: 1rem 1.25rem;
            border-bottom: 1px solid var(--border-subtle);
            background: var(--bg-card);
        }

        .list-header-title {
            font-family: 'Space Grotesk', sans-serif;
            font-size: 0.95rem;
            margin-bottom: 0.75rem;
            display: flex;
            align-items: center;
            justify-content: space-between;
        }

        .list-search {
            display: flex;
            align-items: center;
            background: var(--bg-input);
            border: 1px solid var(--border-subtle);
            border-radius: 6px;
            padding: 0.5rem 0.75rem;
            gap: 0.5rem;
        }

        .list-search svg { width: 16px; height: 16px; color: var(--text-muted); flex-shrink: 0; }

        .list-search input {
            flex: 1;
            background: transparent;
            border: none;
            color: var(--text-primary);
            font-family: inherit;
            font-size: 0.85rem;
            outline: none;
        }

        .list-search input::placeholder { color: var(--text-muted); }

        .list-filters {
            display: flex;
            gap: 0.5rem;
            padding: 0.75rem 1.25rem;
            border-bottom: 1px solid rgba(255,255,255,0.03);
            background: var(--bg-card);
        }

        .filter-chip {
            padding: 0.35rem 0.7rem;
            background: transparent;
            border: 1px solid var(--border-subtle);
            border-radius: 4px;
            color: var(--text-secondary);
            font-family: inherit;
            font-size: 0.75rem;
            cursor: pointer;
            transition: all 0.15s ease;
        }

        .filter-chip:hover { border-color: var(--gold-primary); color: var(--text-primary); }
        .filter-chip.active { background: var(--gold-primary); border-color: var(--gold-primary); color: var(--bg-deep); }

        .list-content { flex: 1; overflow-y: auto; }

        /* Org Stats Bar */
        .org-stats-bar {
            display: flex;
            align-items: center;
            gap: 8px;
            padding: 6px 16px;
            background: rgba(212,168,83,0.04);
            border-bottom: 1px solid rgba(212,168,83,0.1);
            flex-shrink: 0;
        }
        .org-stat-item {
            display: flex;
            align-items: center;
            gap: 4px;
        }
        .org-stat-value {
            font-size: 12px;
            font-weight: 700;
            color: var(--gold-primary);
        }
        .org-stat-label {
            font-size: 10px;
            color: var(--text-muted);
            text-transform: uppercase;
            letter-spacing: 0.3px;
        }
        .org-stat-divider {
            font-size: 10px;
            color: rgba(255,255,255,0.15);
        }

        .org-item {
            padding: 1rem 1.25rem;
            border-bottom: 1px solid rgba(255,255,255,0.03);
            cursor: pointer;
            transition: background 0.15s ease;
            position: relative;
        }

        .org-item:hover { background: rgba(255,255,255,0.02); }
        .org-item.active { background: var(--university-bg); }
        .org-item.unread::before {
            content: '';
            position: absolute;
            left: 0;
            top: 0;
            bottom: 0;
            width: 3px;
            background: var(--gold-primary);
        }

        .org-item-header {
            display: flex;
            align-items: flex-start;
            justify-content: space-between;
            margin-bottom: 0.35rem;
        }

        .org-item-name {
            font-weight: 500;
            font-size: 0.9rem;
            color: var(--text-primary);
            line-height: 1.3;
        }

        .org-item-time {
            font-size: 0.7rem;
            color: var(--text-muted);
            white-space: nowrap;
            margin-left: 0.5rem;
        }

        .org-item-meta {
            display: flex;
            align-items: center;
            gap: 0.5rem;
            margin-bottom: 0.35rem;
        }

        .type-dot {
            width: 8px;
            height: 8px;
            border-radius: 50%;
        }

        .type-dot.university { background: var(--gold-primary); }
        .type-dot.media { background: var(--media-accent); }
        .type-dot.government { background: #22c55e; }
        .type-dot.corporate { background: #3b82f6; }

        .org-item-detail {
            font-size: 0.8rem;
            color: var(--text-secondary);
        }

        .org-item-preview {
            font-size: 0.8rem;
            color: var(--text-muted);
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
            display: flex;
            gap: 0.5rem;
            align-items: center;
        }
        
        .org-item-preview .primary-contact {
            color: var(--text-secondary);
            font-size: 0.75rem;
        }
        
        .org-item-preview .last-msg {
            color: var(--text-muted);
            font-size: 0.75rem;
        }
        
        .org-item-contacts {
            font-size: 0.7rem;
            color: var(--text-muted);
            margin-left: auto;
        }
        
        /* Organization Contacts Card */
        .contacts-card {
            background: linear-gradient(135deg, rgba(139,92,246,0.05) 0%, rgba(59,130,246,0.05) 100%);
            border: 1px solid rgba(139,92,246,0.2);
        }
        
        .contacts-card .detail-card-title {
            display: flex;
            justify-content: space-between;
            align-items: center;
        }
        
        .add-contact-btn {
            display: flex;
            align-items: center;
            gap: 0.25rem;
            padding: 0.25rem 0.5rem;
            font-size: 0.7rem;
            background: rgba(139,92,246,0.15);
            border: 1px solid rgba(139,92,246,0.3);
            border-radius: 4px;
            color: #a78bfa;
            cursor: pointer;
            transition: all 0.2s ease;
        }
        
        .add-contact-btn:hover {
            background: rgba(139,92,246,0.25);
        }
        
        .contacts-list {
            display: flex;
            flex-direction: column;
            gap: 0.5rem;
            max-height: 300px;
            overflow-y: auto;
            margin: 0.75rem 0;
        }
        
        .contact-item {
            padding: 0.75rem;
            background: rgba(0,0,0,0.2);
            border: 1px solid rgba(255,255,255,0.05);
            border-radius: 8px;
            transition: all 0.2s ease;
        }
        
        .contact-item:hover {
            border-color: rgba(139,92,246,0.3);
            background: rgba(139,92,246,0.05);
        }
        
        .contact-item.primary {
            border-color: rgba(212,168,83,0.3);
            background: rgba(212,168,83,0.05);
        }
        
        .contact-item-main {
            display: flex;
            justify-content: space-between;
            align-items: flex-start;
            margin-bottom: 0.35rem;
        }
        
        .contact-item-name {
            font-weight: 500;
            color: var(--text-primary);
            font-size: 0.85rem;
            display: flex;
            align-items: center;
            gap: 0.35rem;
        }
        
        .contact-item-name .primary-badge {
            color: var(--gold-primary);
            font-size: 0.75rem;
        }
        
        .contact-item-title {
            font-size: 0.75rem;
            color: var(--text-muted);
            margin-top: 0.15rem;
        }
        
        .contact-item-actions {
            display: flex;
            gap: 0.25rem;
        }
        
        .contact-action-btn {
            width: 26px;
            height: 26px;
            display: flex;
            align-items: center;
            justify-content: center;
            background: rgba(255,255,255,0.05);
            border: 1px solid rgba(255,255,255,0.1);
            border-radius: 4px;
            color: var(--text-muted);
            cursor: pointer;
            transition: all 0.2s ease;
        }
        
        .contact-action-btn:hover {
            background: rgba(59,130,246,0.15);
            border-color: rgba(59,130,246,0.3);
            color: #60a5fa;
        }
        
        .contact-action-btn.email:hover {
            background: rgba(34,197,94,0.15);
            border-color: rgba(34,197,94,0.3);
            color: #22c55e;
        }
        
        .contact-item-email {
            font-size: 0.75rem;
            margin-bottom: 0.35rem;
        }
        
        .contact-item-email a {
            color: #60a5fa;
            text-decoration: none;
        }
        
        .contact-item-email a:hover {
            text-decoration: underline;
        }
        
        .contact-item-email .no-email {
            color: var(--text-muted);
            font-style: italic;
        }
        
        .contact-item-status {
            display: flex;
            align-items: center;
            gap: 0.5rem;
        }
        
        .contact-item-status .access-key-badge {
            font-size: 0.7rem;
        }
        
        .contacts-actions {
            padding-top: 0.5rem;
            border-top: 1px solid rgba(255,255,255,0.05);
        }
        
        .contacts-bulk-btn {
            width: 100%;
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 0.35rem;
            padding: 0.5rem;
            font-size: 0.8rem;
            background: rgba(34,197,94,0.1);
            border: 1px solid rgba(34,197,94,0.3);
            border-radius: 6px;
            color: #22c55e;
            cursor: pointer;
            transition: all 0.2s ease;
        }
        
        .contacts-bulk-btn:hover:not(:disabled) {
            background: rgba(34,197,94,0.2);
        }
        
        .contacts-bulk-btn:disabled {
            opacity: 0.5;
            cursor: not-allowed;
        }

        .status-indicator {
            display: inline-flex;
            align-items: center;
            gap: 0.25rem;
            font-size: 0.7rem;
            padding: 0.15rem 0.4rem;
            border-radius: 3px;
            text-transform: uppercase;
            letter-spacing: 0.03em;
        }

        .status-indicator.pending { background: var(--warning-bg); color: var(--warning); }
        .status-indicator.viewed { background: var(--info-bg); color: var(--info); }
        .status-indicator.responded { background: var(--success-bg); color: var(--success); }
        .status-indicator.accepted { background: var(--success-bg); color: var(--success); }

        /* ===== TAG PILLS ===== */
        .org-tag-row {
            display: flex;
            gap: 4px;
            flex-wrap: wrap;
            margin-bottom: 4px;
        }
        .org-tag-pill {
            font-size: 9px;
            padding: 1px 6px;
            border-radius: 8px;
            font-weight: 600;
            text-transform: uppercase;
            letter-spacing: 0.3px;
            white-space: nowrap;
            cursor: pointer;
            transition: opacity 0.2s;
        }
        .org-tag-pill:hover { opacity: 0.8; }
        .org-tag-pill.beat { background: rgba(139, 92, 246, 0.15); color: #a78bfa; }
        .org-tag-pill.scope { background: rgba(59, 130, 246, 0.15); color: #60a5fa; }
        .org-tag-pill.size { background: rgba(34, 197, 94, 0.15); color: #4ade80; }
        .org-tag-pill.sector { background: rgba(212, 168, 83, 0.15); color: #D4A853; }

        /* ===== DETAIL PANEL ===== */
        .detail-panel {
            display: flex;
            flex-direction: column;
            overflow: hidden;
            background: var(--bg-deep);
        }

        .detail-header {
            padding: 1rem 1.5rem;
            border-bottom: 1px solid var(--border-subtle);
            background: var(--bg-card);
            display: flex;
            align-items: center;
            justify-content: space-between;
        }

        .detail-header-info h2 {
            font-family: 'Space Grotesk', sans-serif;
            font-size: 1.1rem;
            color: var(--text-primary);
            margin-bottom: 0.2rem;
        }

        .detail-header-info p {
            font-size: 0.8rem;
            color: var(--text-secondary);
        }

        .detail-actions {
            display: flex;
            gap: 0.5rem;
        }

        .action-btn {
            padding: 0.45rem 0.85rem;
            background: transparent;
            border: 1px solid var(--border-subtle);
            border-radius: 4px;
            color: var(--text-secondary);
            font-family: inherit;
            font-size: 0.8rem;
            cursor: pointer;
            transition: all 0.15s ease;
            display: flex;
            align-items: center;
            gap: 0.35rem;
        }

        .action-btn:hover { border-color: var(--gold-primary); color: var(--gold-primary); }
        .action-btn svg { width: 14px; height: 14px; }

        .action-btn.primary {
            background: var(--gold-primary);
            border-color: var(--gold-primary);
            color: var(--bg-deep);
        }

        .action-btn.primary:hover { background: var(--gold-light); }

        .action-btn.danger { border-color: var(--error); color: var(--error); }
        .action-btn.danger:hover { background: var(--error-bg); }

        /* Tabs */
        .detail-tabs {
            display: flex;
            border-bottom: 1px solid var(--border-subtle);
            background: var(--bg-card);
        }

        .detail-tab {
            padding: 0.85rem 1.25rem;
            background: transparent;
            border: none;
            border-bottom: 2px solid transparent;
            color: var(--text-secondary);
            font-family: 'Space Grotesk', sans-serif;
            font-size: 0.8rem;
            cursor: pointer;
            transition: all 0.15s ease;
        }

        .detail-tab:hover { color: var(--text-primary); }
        .detail-tab.active { color: var(--gold-primary); border-bottom-color: var(--gold-primary); }

        /* Conversation Thread */
        .detail-content {
            flex: 1;
            overflow-y: auto;
            padding: 1.5rem;
        }

        .message-thread { display: flex; flex-direction: column; gap: 0.75rem; }

        .message-item {
            max-width: 85%;
            position: relative;
            display: flex;
            gap: 10px;
            align-items: flex-start;
        }

        .message-item.msg-group-continuation { margin-top: -4px; }
        .message-item.msg-group-continuation .message-bubble { border-top-left-radius: 4px; }
        .message-item.inbound.msg-group-continuation .message-bubble { border-top-right-radius: 4px; border-top-left-radius: 12px; }

        .message-item.outbound { align-self: flex-start; }
        .message-item.inbound { align-self: flex-end; flex-direction: row-reverse; }

        .message-bubble {
            padding: 1rem 1.25rem;
            border-radius: 12px;
            position: relative;
            flex: 1;
            min-width: 0;
        }

        .message-item.outbound .message-bubble {
            background: linear-gradient(135deg, rgba(212, 168, 83, 0.15) 0%, rgba(212, 168, 83, 0.05) 100%);
            border: 1px solid rgba(212, 168, 83, 0.25);
            border-radius: 12px 12px 12px 2px;
        }

        .message-item.inbound .message-bubble {
            background: var(--bg-elevated);
            border: 1px solid var(--border-subtle);
            border-radius: 12px 12px 2px 12px;
        }

        .message-header {
            display: flex;
            align-items: center;
            justify-content: space-between;
            margin-bottom: 0.5rem;
        }

        .message-sender {
            font-family: 'Space Grotesk', sans-serif;
            font-size: 0.7rem;
            text-transform: uppercase;
            letter-spacing: 0.08em;
            color: var(--gold-primary);
        }

        .message-item.inbound .message-sender { color: var(--text-secondary); }

        .message-time {
            font-size: 0.7rem;
            color: var(--text-muted);
        }

        .message-body {
            font-size: 0.9rem;
            line-height: 1.7;
            color: var(--text-primary);
        }

        .message-body p { margin-bottom: 0.75rem; }
        .message-body p:last-child { margin-bottom: 0; }
        .message-body strong { color: var(--gold-light); }

        .message-actions {
            margin-top: 0.75rem;
            padding-top: 0.75rem;
            border-top: 1px solid rgba(255,255,255,0.05);
            display: flex;
            gap: 0.75rem;
        }

        .message-action-btn {
            font-size: 0.7rem;
            color: var(--text-muted);
            background: none;
            border: none;
            cursor: pointer;
            display: flex;
            align-items: center;
            gap: 0.25rem;
            padding: 0.25rem 0.5rem;
            border-radius: 4px;
            transition: all 0.15s ease;
        }

        .message-action-btn:hover { color: var(--gold-primary); background: rgba(212, 168, 83, 0.1); }
        .message-action-btn.delete:hover { color: var(--error); background: var(--error-bg); }
        .message-action-btn svg { width: 12px; height: 12px; }

        /* Compose Area */
        .compose-area {
            padding: 1.25rem 1.5rem;
            border-top: 1px solid var(--border-subtle);
            background: var(--bg-card);
        }

        .compose-header {
            display: flex;
            align-items: center;
            justify-content: space-between;
            margin-bottom: 0.75rem;
        }

        .compose-label {
            font-family: 'Space Grotesk', sans-serif;
            font-size: 0.7rem;
            text-transform: uppercase;
            letter-spacing: 0.1em;
            color: var(--text-secondary);
        }

        .compose-tools {
            display: flex;
            gap: 0.5rem;
        }

        .tool-btn {
            width: 28px;
            height: 28px;
            background: var(--bg-elevated);
            border: 1px solid var(--border-subtle);
            border-radius: 4px;
            color: var(--text-secondary);
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            transition: all 0.15s ease;
        }

        .tool-btn:hover { border-color: var(--gold-primary); color: var(--gold-primary); }
        .tool-btn svg { width: 14px; height: 14px; }

        .compose-editor {
            width: 100%;
            min-height: 100px;
            max-height: 200px;
            padding: 0.85rem 1rem;
            background: var(--bg-input);
            border: 1px solid var(--border-subtle);
            border-radius: 8px;
            color: var(--text-primary);
            font-family: inherit;
            font-size: 0.9rem;
            line-height: 1.6;
            resize: vertical;
            transition: border-color 0.15s ease;
        }

        .compose-editor:focus { outline: none; border-color: var(--gold-primary); }
        .compose-editor::placeholder { color: var(--text-muted); }

        .compose-footer {
            display: flex;
            align-items: center;
            justify-content: space-between;
            margin-top: 0.85rem;
        }

        .compose-info {
            font-size: 0.75rem;
            color: var(--text-muted);
        }

        .compose-buttons { display: flex; gap: 0.5rem; }

        /* Empty State */
        .empty-state {
            flex: 1;
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            color: var(--text-muted);
            text-align: center;
            padding: 2rem;
        }

        .empty-state svg { width: 48px; height: 48px; margin-bottom: 1rem; opacity: 0.3; }
        .empty-state h3 { font-family: 'Space Grotesk', sans-serif; font-size: 1rem; margin-bottom: 0.5rem; color: var(--text-secondary); }
        .empty-state p { font-size: 0.85rem; }

        /* Modal */
        .modal-overlay {
            position: fixed;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background: rgba(0,0,0,0.7);
            z-index: 1000;
            display: flex;
            align-items: center;
            justify-content: center;
            opacity: 0;
            visibility: hidden;
            transition: all 0.2s ease;
        }

        .modal-overlay.active { opacity: 1; visibility: visible; }

        .modal {
            width: 90%;
            max-width: 700px;
            max-height: 85vh;
            background: var(--bg-card);
            border: 1px solid var(--border-subtle);
            border-radius: 12px;
            display: flex;
            flex-direction: column;
            transform: translateY(20px);
            transition: transform 0.2s ease;
        }

        .modal-overlay.active .modal { transform: translateY(0); }

        .modal-header {
            padding: 1.25rem 1.5rem;
            border-bottom: 1px solid var(--border-subtle);
            display: flex;
            align-items: center;
            justify-content: space-between;
        }

        .modal-header h3 {
            font-family: 'Space Grotesk', sans-serif;
            font-size: 1.1rem;
        }

        .modal-close {
            background: none;
            border: none;
            color: var(--text-secondary);
            font-size: 1.5rem;
            cursor: pointer;
            line-height: 1;
        }

        .modal-close:hover { color: var(--text-primary); }

        .modal-body {
            flex: 1;
            overflow-y: auto;
            padding: 1.5rem;
        }

        .modal-footer {
            padding: 1rem 1.5rem;
            border-top: 1px solid var(--border-subtle);
            display: flex;
            justify-content: flex-end;
            gap: 0.75rem;
        }

        /* Form Elements */
        .form-group { margin-bottom: 1.25rem; }

        .form-label {
            display: block;
            font-family: 'Space Grotesk', sans-serif;
            font-size: 0.75rem;
            text-transform: uppercase;
            letter-spacing: 0.1em;
            color: var(--text-secondary);
            margin-bottom: 0.5rem;
        }

        .form-input, .form-select, .form-textarea {
            width: 100%;
            padding: 0.75rem 1rem;
            background: var(--bg-input);
            border: 1px solid var(--border-subtle);
            border-radius: 6px;
            color: var(--text-primary);
            font-family: inherit;
            font-size: 0.9rem;
            transition: border-color 0.15s ease;
        }

        .form-input:focus, .form-select:focus, .form-textarea:focus {
            outline: none;
            border-color: var(--gold-primary);
        }

        .form-textarea {
            min-height: 250px;
            line-height: 1.7;
            resize: vertical;
        }

        .form-help {
            font-size: 0.75rem;
            color: var(--text-muted);
            margin-top: 0.35rem;
        }

        .variable-chips {
            display: flex;
            flex-wrap: wrap;
            gap: 0.5rem;
            margin-top: 0.75rem;
        }

        .variable-chip {
            padding: 0.3rem 0.6rem;
            background: var(--bg-elevated);
            border: 1px solid var(--border-subtle);
            border-radius: 4px;
            font-family: 'Space Grotesk', sans-serif;
            font-size: 0.7rem;
            color: var(--gold-primary);
            cursor: pointer;
            transition: all 0.15s ease;
        }

        .variable-chip:hover { background: var(--university-bg); border-color: var(--gold-primary); }

        /* Partner Details */
        .details-grid {
            display: grid;
            gap: 1.25rem;
        }

        .detail-card {
            background: var(--bg-elevated);
            border: 1px solid var(--border-subtle);
            border-radius: 8px;
            padding: 1.25rem;
        }

        .detail-card-title {
            font-family: 'Space Grotesk', sans-serif;
            font-size: 0.7rem;
            text-transform: uppercase;
            letter-spacing: 0.1em;
            color: var(--gold-primary);
            margin-bottom: 1rem;
            padding-bottom: 0.5rem;
            border-bottom: 1px solid var(--border-subtle);
        }

        .detail-row {
            display: flex;
            justify-content: space-between;
            align-items: flex-start;
            padding: 0.5rem 0;
            font-size: 0.85rem;
        }

        .detail-row-label { color: var(--text-secondary); }
        .detail-row-value { color: var(--text-primary); text-align: right; max-width: 60%; }

        .key-display {
            font-family: 'Space Grotesk', sans-serif;
            font-size: 0.8rem;
            background: var(--bg-input);
            padding: 0.3rem 0.5rem;
            border-radius: 4px;
            letter-spacing: 0.05em;
        }

        .color-swatch-row {
            display: flex;
            align-items: center;
            gap: 0.5rem;
        }

        .color-swatch {
            width: 20px;
            height: 20px;
            border-radius: 4px;
            border: 1px solid rgba(255,255,255,0.1);
        }

        .contact-card {
            padding: 0.75rem 0;
            border-bottom: 1px solid rgba(255,255,255,0.03);
        }

        .contact-card:last-child { border-bottom: none; padding-bottom: 0; }

        .contact-name { font-weight: 500; margin-bottom: 0.2rem; }
        .contact-title { font-size: 0.8rem; color: var(--text-secondary); margin-bottom: 0.15rem; }
        .contact-email { font-size: 0.8rem; color: var(--gold-primary); }

        /* Outreach Tracking Card */
        .outreach-tracking-card .detail-card-title {
            display: flex;
            align-items: center;
            gap: 0.5rem;
        }
        
        .outreach-count {
            background: var(--bg-deep);
            padding: 0.25rem 0.5rem;
            border-radius: 4px;
            font-family: 'Space Grotesk', sans-serif;
            font-size: 0.85rem;
        }
        
        .outreach-count.has-sent {
            background: rgba(74, 222, 128, 0.15);
            color: #4ade80;
        }
        
        .outreach-status {
            padding: 0.2rem 0.5rem;
            border-radius: 4px;
            font-size: 0.75rem;
            font-weight: 500;
        }
        
        .outreach-status.sent {
            background: rgba(74, 222, 128, 0.15);
            color: #4ade80;
        }
        
        .outreach-status.active {
            background: rgba(96, 165, 250, 0.15);
            color: #60a5fa;
        }
        
        .outreach-status.pending {
            background: rgba(255, 255, 255, 0.05);
            color: var(--text-muted);
        }
        
        .outreach-actions {
            display: flex;
            gap: 0.5rem;
            margin-top: 1rem;
            padding-top: 1rem;
            border-top: 1px solid var(--border-subtle);
        }
        
        .outreach-action-btn {
            display: flex;
            align-items: center;
            gap: 0.35rem;
            padding: 0.5rem 0.75rem;
            background: var(--bg-deep);
            border: 1px solid var(--border-subtle);
            border-radius: 6px;
            color: var(--text-secondary);
            font-size: 0.75rem;
            cursor: pointer;
            transition: all 0.2s ease;
        }
        
        .outreach-action-btn:hover {
            background: rgba(212, 175, 55, 0.1);
            border-color: var(--gold-primary);
            color: var(--gold-primary);
        }

        /* Confirm Dialog */
        .confirm-dialog {
            max-width: 400px;
        }

        .confirm-dialog .modal-body {
            text-align: center;
            padding: 2rem;
        }

        .confirm-dialog .confirm-icon {
            width: 48px;
            height: 48px;
            margin: 0 auto 1rem;
            color: var(--warning);
        }

        .confirm-dialog h4 {
            font-family: 'Space Grotesk', sans-serif;
            margin-bottom: 0.5rem;
        }

        .confirm-dialog p {
            color: var(--text-secondary);
            font-size: 0.9rem;
        }

        /* Scrollbars */
        ::-webkit-scrollbar { width: 6px; }
        ::-webkit-scrollbar-track { background: transparent; }
        ::-webkit-scrollbar-thumb { background: var(--border-subtle); border-radius: 3px; }
        ::-webkit-scrollbar-thumb:hover { background: var(--gold-dark); }

        /* File Preview */
        .file-preview-container { display: flex; flex-wrap: wrap; gap: 0.5rem; padding: 0.5rem 0; }
        .file-preview-container:empty { display: none; }
        .file-preview-item { position: relative; background: var(--bg-dark); border: 1px solid var(--border-subtle); border-radius: 8px; padding: 0.5rem; display: flex; align-items: center; gap: 0.5rem; }
        .file-preview-item img { width: 40px; height: 40px; object-fit: cover; border-radius: 4px; }
        .file-preview-item .file-icon { width: 40px; height: 40px; background: var(--bg-deep); border-radius: 4px; display: flex; align-items: center; justify-content: center; color: var(--gold); font-size: 0.7rem; font-weight: 600; }
        .file-preview-info { flex: 1; min-width: 0; }
        .file-preview-name { color: var(--text-light); font-size: 0.8rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 120px; }
        .file-preview-size { color: var(--text-muted); font-size: 0.7rem; }
        .file-preview-remove { position: absolute; top: -6px; right: -6px; width: 18px; height: 18px; background: #e74c3c; border: none; border-radius: 50%; color: white; font-size: 12px; cursor: pointer; display: flex; align-items: center; justify-content: center; }

        /* Message Attachments */
        .message-attachments { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 0.75rem; padding-top: 0.75rem; border-top: 1px solid var(--border-subtle); }
        .message-attachment { display: flex; align-items: center; gap: 0.5rem; padding: 0.5rem 0.75rem; background: var(--bg-deep); border-radius: 6px; cursor: pointer; transition: all 0.2s ease; text-decoration: none; color: inherit; position: relative; }
        .message-attachment:hover { background: rgba(212, 175, 55, 0.15); }
        .message-attachment.pdf { border-left: 3px solid #E74C3C; }
        .message-attachment.doc { border-left: 3px solid #2B579A; }
        .message-attachment.spreadsheet { border-left: 3px solid #217346; }
        .message-attachment.image { border-left: 3px solid #9B59B6; }
        .message-attachment-icon { width: 32px; height: 32px; border-radius: 4px; display: flex; align-items: center; justify-content: center; background: var(--bg-card); color: var(--gold); font-size: 0.65rem; font-weight: 600; }
        .message-attachment-icon img { width: 100%; height: 100%; object-fit: cover; border-radius: 4px; }
        .message-attachment-icon svg { width: 18px; height: 18px; }
        .message-attachment-info { font-size: 0.8rem; flex: 1; min-width: 0; }
        .message-attachment-name { color: var(--text-light); max-width: 150px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
        .message-attachment-size { color: var(--text-muted); font-size: 0.7rem; }
        .attachment-actions { display: flex; gap: 0.25rem; }
        .attachment-download, .attachment-preview { background: transparent; border: none; color: var(--text-muted); cursor: pointer; padding: 0.25rem; border-radius: 4px; transition: all 0.2s ease; }
        .attachment-download:hover, .attachment-preview:hover { color: var(--gold); background: rgba(212, 175, 55, 0.1); }
        .attachment-download svg, .attachment-preview svg { width: 16px; height: 16px; }

        /* File Preview Modal */
        .file-preview-modal { position: fixed; top: 0; left: 0; right: 0; bottom: 0; background: rgba(0,0,0,0.95); z-index: 10000; display: flex; align-items: center; justify-content: center; opacity: 0; visibility: hidden; transition: all 0.3s ease; }
        .file-preview-modal.active { opacity: 1; visibility: visible; }
        .file-preview-modal-content { width: 90vw; height: 90vh; background: var(--bg-card); border-radius: 12px; display: flex; flex-direction: column; overflow: hidden; }
        .file-preview-modal-header { display: flex; align-items: center; justify-content: space-between; padding: 1rem 1.5rem; border-bottom: 1px solid var(--border-subtle); background: var(--bg-deep); }
        .file-preview-modal-title { font-weight: 600; color: var(--text-light); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 60%; }

        /* ===== SPLIT VIEW DOCUMENT PREVIEW ===== */
        .detail-panel { position: relative; transition: all 0.3s ease; }
        .detail-panel.has-preview { }
        
        .detail-main { display: flex; flex-direction: column; height: 100%; transition: all 0.3s ease; }
        .detail-panel.has-preview .detail-main { width: 50%; border-right: 1px solid var(--border-subtle); }
        
        /* Document Preview Panel */
        .doc-preview-panel {
            position: absolute;
            top: 0;
            right: 0;
            width: 50%;
            height: 100%;
            background: var(--bg-card);
            display: flex;
            flex-direction: column;
            transform: translateX(100%);
            opacity: 0;
            transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
            z-index: 100;
        }
        .detail-panel.has-preview .doc-preview-panel {
            transform: translateX(0);
            opacity: 1;
        }
        
        /* Preview Header */
        .doc-preview-header {
            display: flex;
            align-items: center;
            justify-content: space-between;
            padding: 1rem 1.25rem;
            background: linear-gradient(135deg, var(--bg-deep) 0%, var(--bg-card) 100%);
            border-bottom: 1px solid var(--border-subtle);
        }
        .doc-preview-header-info {
            flex: 1;
            min-width: 0;
        }
        .doc-preview-title {
            font-size: 1rem;
            font-weight: 600;
            color: var(--text-primary);
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
            margin-bottom: 0.25rem;
        }
        .doc-preview-meta {
            display: flex;
            gap: 0.75rem;
            font-size: 0.75rem;
            color: var(--text-muted);
        }
        .doc-preview-meta span {
            display: flex;
            align-items: center;
            gap: 0.25rem;
        }
        .doc-preview-actions {
            display: flex;
            gap: 0.5rem;
        }
        .doc-preview-btn {
            width: 36px;
            height: 36px;
            background: transparent;
            border: 1px solid var(--border-subtle);
            border-radius: 8px;
            color: var(--text-secondary);
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            transition: all 0.2s ease;
        }
        .doc-preview-btn:hover {
            border-color: var(--gold-primary);
            color: var(--gold-primary);
            background: rgba(212, 168, 83, 0.1);
        }
        .doc-preview-btn.close:hover {
            border-color: var(--error);
            color: var(--error);
            background: var(--error-bg);
        }
        .doc-preview-btn svg {
            width: 18px;
            height: 18px;
        }
        
        /* Preview Tabs */
        .doc-preview-tabs {
            display: flex;
            border-bottom: 1px solid var(--border-subtle);
            background: var(--bg-deep);
        }
        .doc-preview-tab {
            flex: 1;
            padding: 0.75rem;
            background: transparent;
            border: none;
            color: var(--text-muted);
            font-size: 0.8rem;
            font-family: inherit;
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 0.4rem;
            position: relative;
            transition: all 0.2s ease;
        }
        .doc-preview-tab:hover {
            color: var(--text-primary);
            background: rgba(255,255,255,0.03);
        }
        .doc-preview-tab.active {
            color: var(--gold-primary);
        }
        .doc-preview-tab.active::after {
            content: '';
            position: absolute;
            bottom: 0;
            left: 0;
            right: 0;
            height: 2px;
            background: var(--gold-primary);
        }
        .doc-preview-tab svg {
            width: 14px;
            height: 14px;
        }
        .doc-preview-tab-badge {
            background: var(--gold-primary);
            color: var(--bg-deep);
            font-size: 0.65rem;
            padding: 0.1rem 0.35rem;
            border-radius: 8px;
            font-weight: 600;
        }
        
        /* Preview Content Area */
        .doc-preview-content {
            flex: 1;
            overflow: hidden;
            display: flex;
            flex-direction: column;
        }
        
        /* Preview Viewer */
        .doc-preview-viewer {
            flex: 1;
            overflow: auto;
            display: flex;
            align-items: center;
            justify-content: center;
            background: #0d0d12;
            position: relative;
        }
        .doc-preview-viewer iframe {
            width: 100%;
            height: 100%;
            border: none;
            background: white;
        }
        .doc-preview-viewer img {
            max-width: 100%;
            max-height: 100%;
            object-fit: contain;
            cursor: zoom-in;
        }
        .doc-preview-viewer img.zoomed {
            max-width: none;
            max-height: none;
            cursor: zoom-out;
        }
        
        /* Unsupported File */
        .doc-preview-unsupported {
            text-align: center;
            padding: 3rem;
            color: var(--text-muted);
        }
        .doc-preview-unsupported svg {
            width: 64px;
            height: 64px;
            margin-bottom: 1rem;
            opacity: 0.3;
        }
        .doc-preview-unsupported h4 {
            color: var(--text-primary);
            margin-bottom: 0.5rem;
        }
        .doc-preview-unsupported .download-btn {
            margin-top: 1rem;
            padding: 0.75rem 1.5rem;
            background: var(--gold-primary);
            color: var(--bg-deep);
            border: none;
            border-radius: 8px;
            font-weight: 600;
            cursor: pointer;
            display: inline-flex;
            align-items: center;
            gap: 0.5rem;
            transition: all 0.2s ease;
        }
        .doc-preview-unsupported .download-btn:hover {
            transform: translateY(-2px);
            box-shadow: 0 4px 12px rgba(212, 168, 83, 0.3);
        }
        
        /* Annotations Panel */
        .doc-preview-annotations {
            flex: 1;
            overflow-y: auto;
            padding: 1rem;
        }
        .annotation-header {
            display: flex;
            align-items: center;
            justify-content: space-between;
            margin-bottom: 1rem;
        }
        .annotation-header h4 {
            font-size: 0.9rem;
            color: var(--text-primary);
        }
        .annotation-add-btn {
            padding: 0.4rem 0.75rem;
            background: var(--gold-primary);
            color: var(--bg-deep);
            border: none;
            border-radius: 6px;
            font-size: 0.75rem;
            font-weight: 600;
            cursor: pointer;
            display: flex;
            align-items: center;
            gap: 0.3rem;
            transition: all 0.2s ease;
        }
        .annotation-add-btn:hover {
            transform: translateY(-1px);
        }
        .annotation-add-btn svg {
            width: 12px;
            height: 12px;
        }
        .annotation-list {
            display: flex;
            flex-direction: column;
            gap: 0.75rem;
        }
        .annotation-item {
            background: var(--bg-deep);
            border-radius: 8px;
            padding: 0.75rem;
            border-left: 3px solid var(--gold-primary);
        }
        .annotation-item.partner {
            border-left-color: var(--info);
        }
        .annotation-item-header {
            display: flex;
            align-items: center;
            justify-content: space-between;
            margin-bottom: 0.5rem;
        }
        .annotation-author {
            font-size: 0.75rem;
            font-weight: 600;
            color: var(--gold-primary);
        }
        .annotation-item.partner .annotation-author {
            color: var(--info);
        }
        .annotation-time {
            font-size: 0.65rem;
            color: var(--text-muted);
        }
        .annotation-text {
            font-size: 0.85rem;
            color: var(--text-primary);
            line-height: 1.5;
        }
        .annotation-actions {
            display: flex;
            gap: 0.5rem;
            margin-top: 0.5rem;
        }
        .annotation-action-btn {
            background: transparent;
            border: none;
            color: var(--text-muted);
            font-size: 0.7rem;
            cursor: pointer;
            padding: 0.2rem 0.4rem;
            border-radius: 4px;
            transition: all 0.2s ease;
        }
        .annotation-action-btn:hover {
            color: var(--gold-primary);
            background: rgba(212, 168, 83, 0.1);
        }
        .annotation-empty {
            text-align: center;
            padding: 2rem;
            color: var(--text-muted);
        }
        .annotation-empty svg {
            width: 48px;
            height: 48px;
            margin-bottom: 0.75rem;
            opacity: 0.3;
        }
        
        /* Add Annotation Form */
        .annotation-form {
            background: var(--bg-deep);
            border-radius: 8px;
            padding: 0.75rem;
            margin-bottom: 1rem;
            display: none;
        }
        .annotation-form.active {
            display: block;
        }
        .annotation-form textarea {
            width: 100%;
            min-height: 80px;
            padding: 0.75rem;
            background: var(--bg-input);
            border: 1px solid var(--border-subtle);
            border-radius: 6px;
            color: var(--text-primary);
            font-family: inherit;
            font-size: 0.85rem;
            resize: vertical;
            margin-bottom: 0.5rem;
        }
        .annotation-form textarea:focus {
            outline: none;
            border-color: var(--gold-primary);
        }
        .annotation-form-actions {
            display: flex;
            justify-content: flex-end;
            gap: 0.5rem;
        }
        .annotation-form-btn {
            padding: 0.4rem 0.75rem;
            border-radius: 6px;
            font-size: 0.75rem;
            font-weight: 500;
            cursor: pointer;
            transition: all 0.2s ease;
        }
        .annotation-form-btn.cancel {
            background: transparent;
            border: 1px solid var(--border-subtle);
            color: var(--text-muted);
        }
        .annotation-form-btn.save {
            background: var(--gold-primary);
            border: none;
            color: var(--bg-deep);
        }
        
        /* File Info Panel */
        .doc-preview-info {
            flex: 1;
            overflow-y: auto;
            padding: 1rem;
        }
        .file-info-section {
            margin-bottom: 1.5rem;
        }
        .file-info-section h4 {
            font-size: 0.8rem;
            color: var(--text-muted);
            text-transform: uppercase;
            letter-spacing: 0.05em;
            margin-bottom: 0.75rem;
            padding-bottom: 0.5rem;
            border-bottom: 1px solid var(--border-subtle);
        }
        .file-info-row {
            display: flex;
            justify-content: space-between;
            padding: 0.5rem 0;
            font-size: 0.85rem;
        }
        .file-info-label {
            color: var(--text-muted);
        }
        .file-info-value {
            color: var(--text-primary);
            font-weight: 500;
        }
        .file-info-icon {
            width: 80px;
            height: 80px;
            margin: 0 auto 1rem;
            background: var(--bg-deep);
            border-radius: 12px;
            display: flex;
            align-items: center;
            justify-content: center;
        }
        .file-info-icon svg {
            width: 40px;
            height: 40px;
        }
        .file-info-icon.pdf { color: #E74C3C; }
        .file-info-icon.doc { color: #2B579A; }
        .file-info-icon.xls { color: #217346; }
        .file-info-icon.ppt { color: #D24726; }
        .file-info-icon.image { color: #9B59B6; }
        
        /* Preview Footer */
        .doc-preview-footer {
            padding: 0.75rem 1rem;
            background: var(--bg-deep);
            border-top: 1px solid var(--border-subtle);
            display: flex;
            justify-content: space-between;
            align-items: center;
        }
        .doc-preview-nav {
            display: flex;
            gap: 0.5rem;
        }
        .doc-preview-nav-btn {
            padding: 0.4rem 0.75rem;
            background: transparent;
            border: 1px solid var(--border-subtle);
            border-radius: 6px;
            color: var(--text-muted);
            font-size: 0.75rem;
            cursor: pointer;
            display: flex;
            align-items: center;
            gap: 0.3rem;
            transition: all 0.2s ease;
        }
        .doc-preview-nav-btn:hover:not(:disabled) {
            border-color: var(--gold-primary);
            color: var(--gold-primary);
        }
        .doc-preview-nav-btn:disabled {
            opacity: 0.3;
            cursor: not-allowed;
        }
        .doc-preview-nav-btn svg {
            width: 14px;
            height: 14px;
        }
        .doc-preview-download-btn {
            padding: 0.5rem 1rem;
            background: var(--gold-primary);
            color: var(--bg-deep);
            border: none;
            border-radius: 6px;
            font-weight: 600;
            font-size: 0.8rem;
            cursor: pointer;
            display: flex;
            align-items: center;
            gap: 0.4rem;
            transition: all 0.2s ease;
        }
        .doc-preview-download-btn:hover {
            transform: translateY(-1px);
            box-shadow: 0 4px 12px rgba(212, 168, 83, 0.3);
        }
        .doc-preview-download-btn svg {
            width: 16px;
            height: 16px;
        }
        
        /* Responsive adjustments */
        @media (max-width: 1200px) {
            .detail-panel.has-preview .detail-main { width: 45%; }
            .doc-preview-panel { width: 55%; }
        }
        @media (max-width: 900px) {
            .detail-panel.has-preview .detail-main { display: none; }
            .doc-preview-panel { width: 100%; }
        }
        .file-preview-modal-actions { display: flex; align-items: center; gap: 0.75rem; }
        .file-preview-modal-download { display: flex; align-items: center; gap: 0.5rem; padding: 0.5rem 1rem; background: var(--gold); color: var(--bg-dark); border: none; border-radius: 6px; cursor: pointer; font-weight: 500; transition: all 0.2s ease; }
        .file-preview-modal-download:hover { transform: translateY(-1px); box-shadow: 0 4px 12px rgba(212, 175, 55, 0.3); }
        .file-preview-modal-download svg { width: 16px; height: 16px; }
        .file-preview-modal-close { width: 36px; height: 36px; background: transparent; border: 1px solid var(--border-subtle); border-radius: 6px; color: var(--text-muted); font-size: 24px; cursor: pointer; display: flex; align-items: center; justify-content: center; }
        .file-preview-modal-close:hover { border-color: #e74c3c; color: #e74c3c; }
        .file-preview-modal-body { flex: 1; overflow: auto; display: flex; align-items: center; justify-content: center; background: #1a1a1a; }
        .file-preview-modal-body iframe { border: none; background: white; }
        .file-preview-modal-body img { max-width: 100%; max-height: 100%; object-fit: contain; }
        .file-preview-unsupported { text-align: center; color: var(--text-muted); padding: 3rem; }
        .file-preview-unsupported svg { margin-bottom: 1rem; opacity: 0.5; }
        .file-preview-unsupported button { margin-top: 1rem; padding: 0.75rem 1.5rem; background: var(--gold); color: var(--bg-dark); border: none; border-radius: 6px; cursor: pointer; font-weight: 500; }

        /* Files Tab */
        .files-container { padding: 1.5rem; overflow-y: auto; height: 100%; }
        .files-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 1.5rem; }
        .files-header h3 { font-size: 1.1rem; color: var(--text-light); font-weight: 600; }
        .files-download-all { display: flex; align-items: center; gap: 0.5rem; padding: 0.5rem 1rem; background: transparent; border: 1px solid var(--border-subtle); color: var(--text-muted); border-radius: 6px; cursor: pointer; font-size: 0.85rem; transition: all 0.2s ease; }
        .files-download-all:hover { border-color: var(--gold); color: var(--gold); }
        .files-download-all svg { width: 16px; height: 16px; }
        .files-section { margin-bottom: 2rem; }
        .files-section-title { display: flex; align-items: center; gap: 0.5rem; font-size: 0.9rem; color: var(--text-muted); margin-bottom: 1rem; padding-bottom: 0.5rem; border-bottom: 1px solid var(--border-subtle); }
        .files-section-title svg { width: 18px; height: 18px; }
        .files-empty { display: flex; flex-direction: column; align-items: center; justify-content: center; height: 100%; color: var(--text-muted); text-align: center; padding: 3rem; }
        .files-empty svg { opacity: 0.3; margin-bottom: 1rem; }
        .files-empty h3 { color: var(--text-light); margin-bottom: 0.5rem; }

        /* Files Grid (Images) */
        .files-grid.images { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 1rem; }
        .file-card.image-card { background: var(--bg-deep); border-radius: 8px; overflow: hidden; cursor: pointer; transition: all 0.2s ease; border: 1px solid var(--border-subtle); }
        .file-card.image-card:hover { border-color: var(--gold); transform: translateY(-2px); box-shadow: 0 8px 24px rgba(0,0,0,0.3); }
        .file-card-preview { aspect-ratio: 1; overflow: hidden; background: #0a0a0a; }
        .file-card-preview img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.3s ease; }
        .file-card.image-card:hover .file-card-preview img { transform: scale(1.05); }
        .file-card-info { padding: 0.75rem; }
        .file-card-name { font-size: 0.8rem; color: var(--text-light); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-bottom: 0.25rem; }
        .file-card-meta { display: flex; flex-wrap: wrap; gap: 0.5rem; font-size: 0.7rem; color: var(--text-muted); }
        .file-card-sender { padding: 0.15rem 0.4rem; border-radius: 3px; background: var(--bg-card); }
        .file-card-sender.luminary { background: rgba(212, 175, 55, 0.2); color: var(--gold); }
        .file-card-sender.partner { background: rgba(52, 152, 219, 0.2); color: #3498db; }
        .file-card-actions { position: absolute; top: 0.5rem; right: 0.5rem; opacity: 0; transition: opacity 0.2s ease; }
        .file-card:hover .file-card-actions { opacity: 1; }
        .file-card-actions button { width: 32px; height: 32px; background: rgba(0,0,0,0.7); border: none; border-radius: 6px; color: white; cursor: pointer; display: flex; align-items: center; justify-content: center; }
        .file-card-actions button:hover { background: var(--gold); color: var(--bg-dark); }
        .file-card-actions button svg { width: 16px; height: 16px; }
        .file-card.image-card { position: relative; }

        /* Files List (Documents) */
        .files-list { display: flex; flex-direction: column; gap: 0.5rem; }
        .file-card.document-card { display: flex; align-items: center; gap: 1rem; padding: 1rem; background: var(--bg-deep); border-radius: 8px; border: 1px solid var(--border-subtle); transition: all 0.2s ease; cursor: pointer; }
        .file-card.document-card:hover { border-color: var(--gold-primary); background: rgba(212, 168, 83, 0.08); transform: translateX(4px); }
        .file-card-icon { width: 48px; height: 48px; display: flex; align-items: center; justify-content: center; background: var(--bg-card); border-radius: 8px; flex-shrink: 0; }
        .file-card-icon svg { width: 28px; height: 28px; }
        .file-card-icon.pdf { background: rgba(231, 76, 60, 0.1); }
        .file-card-icon.doc, .file-card-icon.docx { background: rgba(43, 87, 154, 0.1); }
        .file-card-icon.xls, .file-card-icon.xlsx, .file-card-icon.csv { background: rgba(33, 115, 70, 0.1); }
        .file-card-icon.ppt, .file-card-icon.pptx { background: rgba(210, 71, 38, 0.1); }
        .file-card.document-card .file-card-info { flex: 1; min-width: 0; }
        .file-card.document-card .file-card-name { font-size: 0.9rem; margin-bottom: 0.35rem; }
        .file-card.document-card .file-card-meta { align-items: center; }
        .file-card-size { color: var(--text-muted); }
        .file-card-context { font-size: 0.75rem; color: var(--text-muted); font-style: italic; margin-top: 0.35rem; opacity: 0.8; }
        .file-card.document-card .file-card-actions { display: flex; gap: 0.5rem; opacity: 1; position: static; }
        .file-card.document-card .file-card-actions button { width: 36px; height: 36px; background: transparent; border: 1px solid var(--border-subtle); border-radius: 6px; color: var(--text-muted); cursor: pointer; display: flex; align-items: center; justify-content: center; transition: all 0.2s ease; }
        .file-card.document-card .file-card-actions button:hover { border-color: var(--gold); color: var(--gold); background: rgba(212, 175, 55, 0.1); }
        .file-card.document-card .file-card-actions button svg { width: 18px; height: 18px; }

        /* Image Lightbox */
        .image-lightbox { position: fixed; top: 0; left: 0; right: 0; bottom: 0; background: rgba(0,0,0,0.95); z-index: 10000; display: flex; align-items: center; justify-content: center; opacity: 0; visibility: hidden; transition: all 0.3s ease; }
        .image-lightbox.active { opacity: 1; visibility: visible; }
        .image-lightbox img { max-width: 90vw; max-height: 90vh; object-fit: contain; border-radius: 8px; }
        .image-lightbox-close { position: absolute; top: 20px; right: 20px; width: 40px; height: 40px; background: rgba(255,255,255,0.1); border: none; border-radius: 50%; color: white; font-size: 24px; cursor: pointer; }

        /* ===== RESEARCH HUB ===== */
        .research-hub {
            position: fixed;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background: var(--bg-deep);
            z-index: 10000;
            display: flex;
            opacity: 0;
            visibility: hidden;
            transition: all 0.3s ease;
        }
        .research-hub.active {
            opacity: 1;
            visibility: visible;
        }
        .research-sidebar {
            width: 300px;
            background: var(--bg-card);
            border-right: 1px solid var(--border-subtle);
            display: flex;
            flex-direction: column;
        }
        .research-sidebar-header {
            padding: 1.25rem;
            border-bottom: 1px solid var(--border-subtle);
            background: linear-gradient(135deg, var(--bg-deep) 0%, var(--bg-card) 100%);
        }
        .research-sidebar-header h2 {
            font-family: 'Space Grotesk', sans-serif;
            font-size: 1.1rem;
            color: var(--gold-primary);
            margin-bottom: 0.5rem;
            display: flex;
            align-items: center;
            gap: 0.5rem;
        }
        .research-org-name {
            font-size: 0.9rem;
            color: var(--text-secondary);
            margin-bottom: 0.5rem;
        }
        .research-progress {
            display: flex;
            align-items: center;
            gap: 0.5rem;
            font-size: 0.75rem;
            color: var(--text-muted);
        }
        .research-progress-bar {
            flex: 1;
            height: 4px;
            background: var(--bg-deep);
            border-radius: 2px;
            overflow: hidden;
        }
        .research-progress-fill {
            height: 100%;
            background: var(--gold-primary);
            transition: width 0.3s ease;
        }
        .research-categories {
            flex: 1;
            overflow-y: auto;
            padding: 0.75rem;
        }
        .research-cat {
            display: flex;
            align-items: center;
            gap: 0.75rem;
            padding: 0.85rem;
            background: var(--bg-deep);
            border: 1px solid var(--border-subtle);
            border-radius: 8px;
            margin-bottom: 0.5rem;
            cursor: pointer;
            transition: all 0.2s ease;
        }
        .research-cat:hover {
            border-color: var(--gold-primary);
            transform: translateX(3px);
        }
        .research-cat.active {
            border-color: var(--gold-primary);
            background: rgba(212, 168, 83, 0.1);
        }
        .research-cat.complete {
            border-left: 3px solid var(--success);
        }
        .research-cat-icon {
            font-size: 1.25rem;
        }
        .research-cat-info {
            flex: 1;
            min-width: 0;
        }
        .research-cat-title {
            font-weight: 600;
            color: var(--text-primary);
            font-size: 0.85rem;
            margin-bottom: 0.15rem;
        }
        .research-cat-status {
            font-size: 0.7rem;
            color: var(--text-muted);
        }
        .research-cat.complete .research-cat-status {
            color: var(--success);
        }
        .research-cat-check {
            width: 20px;
            height: 20px;
            border-radius: 50%;
            border: 2px solid var(--border-subtle);
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 0.7rem;
            color: transparent;
        }
        .research-cat.complete .research-cat-check {
            background: var(--success);
            border-color: var(--success);
            color: white;
        }
        .research-sidebar-footer {
            padding: 1rem;
            border-top: 1px solid var(--border-subtle);
            display: flex;
            flex-direction: column;
            gap: 0.5rem;
        }
        .research-main {
            flex: 1;
            display: flex;
            flex-direction: column;
            background: var(--bg-deep);
        }
        .research-toolbar {
            display: flex;
            align-items: center;
            justify-content: space-between;
            padding: 1rem 1.5rem;
            background: var(--bg-card);
            border-bottom: 1px solid var(--border-subtle);
        }
        .research-toolbar-title {
            font-size: 1rem;
            font-weight: 600;
            color: var(--text-primary);
        }
        .research-toolbar-actions {
            display: flex;
            gap: 0.5rem;
        }
        .research-content {
            flex: 1;
            padding: 1.5rem;
            overflow-y: auto;
        }
        .research-field {
            margin-bottom: 1.25rem;
        }
        .research-field-label {
            display: block;
            font-size: 0.75rem;
            color: var(--text-muted);
            text-transform: uppercase;
            letter-spacing: 0.05em;
            margin-bottom: 0.5rem;
        }
        .research-field-input {
            width: 100%;
            padding: 0.75rem 1rem;
            background: var(--bg-card);
            border: 1px solid var(--border-subtle);
            border-radius: 8px;
            color: var(--text-primary);
            font-size: 0.9rem;
            font-family: inherit;
            resize: vertical;
        }
        .research-field-input:focus {
            outline: none;
            border-color: var(--gold-primary);
        }
        .research-results {
            background: var(--bg-card);
            border: 1px solid var(--border-subtle);
            border-radius: 10px;
            overflow: hidden;
        }
        .research-results-header {
            display: flex;
            align-items: center;
            justify-content: space-between;
            padding: 0.75rem 1rem;
            background: var(--bg-elevated);
            border-bottom: 1px solid var(--border-subtle);
        }
        .research-results-title {
            font-size: 0.85rem;
            font-weight: 600;
            color: var(--text-primary);
        }
        .research-results-meta {
            font-size: 0.7rem;
            color: var(--text-muted);
        }
        .research-results-content {
            padding: 1rem;
            font-size: 0.9rem;
            line-height: 1.7;
            color: var(--text-secondary);
            min-height: 200px;
            max-height: 350px;
            overflow-y: auto;
            white-space: pre-wrap;
        }
        .research-results-placeholder {
            text-align: center;
            padding: 3rem;
            color: var(--text-muted);
        }
        .research-results-placeholder svg {
            width: 48px;
            height: 48px;
            margin-bottom: 1rem;
            opacity: 0.3;
        }
        .research-notes {
            margin-top: 1rem;
        }
        .research-notes-input {
            width: 100%;
            padding: 0.75rem;
            background: var(--bg-deep);
            border: 1px solid var(--border-subtle);
            border-radius: 6px;
            color: var(--text-primary);
            font-size: 0.85rem;
            min-height: 100px;
            resize: vertical;
        }
        .research-close {
            position: absolute;
            top: 1rem;
            right: 1rem;
            width: 40px;
            height: 40px;
            background: var(--bg-card);
            border: 1px solid var(--border-subtle);
            border-radius: 8px;
            color: var(--text-muted);
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            z-index: 10;
        }
        .research-close:hover {
            border-color: var(--error);
            color: var(--error);
        }

        /* ===== DOCUMENT REVIEW WITH SIDENOTES ===== */
        .doc-review {
            position: fixed;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background: var(--bg-deep);
            z-index: 10000;
            display: flex;
            opacity: 0;
            visibility: hidden;
            transition: all 0.3s ease;
        }
        .doc-review.active {
            opacity: 1;
            visibility: visible;
        }
        .doc-review-main {
            flex: 1;
            display: flex;
            flex-direction: column;
            background: #e5e5e5;
        }
        .doc-review-toolbar {
            display: flex;
            align-items: center;
            justify-content: space-between;
            padding: 0.75rem 1.5rem;
            background: var(--bg-card);
            border-bottom: 1px solid var(--border-subtle);
        }
        .doc-review-title {
            font-family: 'Space Grotesk', sans-serif;
            color: var(--gold-primary);
            font-size: 1rem;
        }
        .doc-review-subtitle {
            font-size: 0.8rem;
            color: var(--text-muted);
        }
        .doc-status {
            display: flex;
            align-items: center;
            gap: 1rem;
        }
        .doc-status-badge {
            padding: 0.35rem 0.75rem;
            border-radius: 20px;
            font-size: 0.75rem;
            font-weight: 600;
        }
        .doc-status-badge.draft { background: var(--warning-bg); color: var(--warning); }
        .doc-status-badge.pending { background: var(--info-bg); color: var(--info); }
        .doc-status-badge.signed { background: var(--success-bg); color: var(--success); }
        .doc-review-content {
            flex: 1;
            overflow-y: auto;
            padding: 2rem;
            display: flex;
            justify-content: center;
        }
        .doc-wrapper {
            width: 100%;
            max-width: 850px;
        }
        .doc-paper {
            background: white;
            color: #1a1a1a;
            padding: 3rem;
            border-radius: 4px;
            box-shadow: 0 2px 15px rgba(0,0,0,0.1);
            font-family: 'Inter', sans-serif;
            line-height: 1.8;
        }
        .doc-paper h1 {
            font-family: 'Space Grotesk', sans-serif;
            color: #1a1a1a;
            border-bottom: 2px solid #D4A853;
            padding-bottom: 0.75rem;
            margin-bottom: 1.5rem;
            font-size: 1.5rem;
        }
        .doc-paper h2 {
            font-family: 'Space Grotesk', sans-serif;
            color: #333;
            margin-top: 2rem;
            margin-bottom: 1rem;
            font-size: 1.2rem;
        }
        .doc-paper table {
            width: 100%;
            border-collapse: collapse;
            margin: 1.5rem 0;
        }
        .doc-paper th, .doc-paper td {
            border: 1px solid #ddd;
            padding: 0.75rem;
            text-align: left;
        }
        .doc-paper th {
            background: #f5f5f5;
            font-weight: 600;
        }
        .doc-logo {
            text-align: center;
            margin-bottom: 2rem;
        }
        .doc-logo-text {
            font-family: 'Space Grotesk', sans-serif;
            font-size: 1.8rem;
            color: #D4A853;
            letter-spacing: 0.2em;
        }
        .doc-logo-sub {
            font-size: 0.9rem;
            color: #666;
            margin-top: 0.25rem;
        }

        /* Payment Pathway Box */
        .payment-pathway {
            background: linear-gradient(135deg, #f8f6f0 0%, #f5f5f5 100%);
            border: 1px solid #e0d9c8;
            border-left: 4px solid #D4A853;
            border-radius: 8px;
            padding: 1.5rem;
            margin: 1.5rem 0;
        }
        .payment-pathway h3 {
            font-family: 'Space Grotesk', sans-serif;
            color: #D4A853;
            margin-bottom: 1rem;
            font-size: 1.1rem;
        }
        .pathway-item {
            display: flex;
            align-items: flex-start;
            gap: 0.75rem;
            margin-bottom: 0.75rem;
            padding-bottom: 0.75rem;
            border-bottom: 1px solid #eee;
        }
        .pathway-item:last-child {
            border-bottom: none;
            margin-bottom: 0;
            padding-bottom: 0;
        }
        .pathway-num {
            width: 24px;
            height: 24px;
            background: #D4A853;
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            color: white;
            font-size: 0.75rem;
            font-weight: 600;
            flex-shrink: 0;
        }
        .pathway-text {
            font-size: 0.9rem;
            color: #333;
            line-height: 1.5;
        }

        /* Sidenotes Panel */
        .sidenotes-panel {
            width: 380px;
            background: var(--bg-card);
            border-left: 1px solid var(--border-subtle);
            display: flex;
            flex-direction: column;
        }
        .sidenotes-header {
            padding: 1rem 1.25rem;
            border-bottom: 1px solid var(--border-subtle);
            display: flex;
            align-items: center;
            justify-content: space-between;
        }
        .sidenotes-header h3 {
            font-size: 0.9rem;
            color: var(--text-primary);
            display: flex;
            align-items: center;
            gap: 0.5rem;
        }
        .sidenotes-count {
            background: var(--gold-primary);
            color: var(--bg-deep);
            padding: 0.2rem 0.5rem;
            border-radius: 10px;
            font-size: 0.7rem;
            font-weight: 600;
        }
        .sidenotes-list {
            flex: 1;
            overflow-y: auto;
            padding: 0.75rem;
        }
        .sidenote {
            background: var(--bg-deep);
            border: 1px solid var(--border-subtle);
            border-radius: 8px;
            padding: 0.75rem;
            margin-bottom: 0.75rem;
        }
        .sidenote.from-partner {
            border-left: 3px solid var(--info);
        }
        .sidenote.from-luminary {
            border-left: 3px solid var(--gold-primary);
        }
        .sidenote-header {
            display: flex;
            align-items: center;
            justify-content: space-between;
            margin-bottom: 0.5rem;
        }
        .sidenote-author {
            font-size: 0.75rem;
            font-weight: 600;
            color: var(--text-primary);
        }
        .sidenote-time {
            font-size: 0.65rem;
            color: var(--text-muted);
        }
        .sidenote-content {
            font-size: 0.85rem;
            color: var(--text-secondary);
            line-height: 1.5;
        }
        .sidenote-section {
            font-size: 0.7rem;
            color: var(--gold-primary);
            margin-top: 0.5rem;
            font-style: italic;
        }
        .sidenotes-empty {
            text-align: center;
            padding: 2rem;
            color: var(--text-muted);
            font-size: 0.85rem;
        }
        .sidenotes-compose {
            padding: 1rem;
            border-top: 1px solid var(--border-subtle);
        }
        .sidenotes-compose textarea {
            width: 100%;
            padding: 0.65rem;
            background: var(--bg-input);
            border: 1px solid var(--border-subtle);
            border-radius: 6px;
            color: var(--text-primary);
            font-size: 0.85rem;
            resize: none;
            min-height: 70px;
            margin-bottom: 0.5rem;
            font-family: inherit;
        }
        .sidenotes-compose textarea:focus {
            outline: none;
            border-color: var(--gold-primary);
        }
        .sidenotes-compose-row {
            display: flex;
            align-items: center;
            justify-content: space-between;
        }
        .sidenotes-section-select {
            padding: 0.4rem 0.6rem;
            background: var(--bg-input);
            border: 1px solid var(--border-subtle);
            border-radius: 4px;
            color: var(--text-secondary);
            font-size: 0.75rem;
        }

        /* ===== SIGNATURE CAPTURE ===== */
        .sig-section {
            margin-top: 3rem;
            padding-top: 2rem;
            border-top: 2px solid #D4A853;
        }
        .sig-grid {
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 3rem;
            margin-top: 1.5rem;
        }
        .sig-party {
            text-align: center;
        }
        .sig-party-title {
            font-weight: 600;
            color: #333;
            margin-bottom: 1.5rem;
            font-size: 1rem;
        }
        .sig-canvas-wrap {
            border: 2px dashed #ccc;
            border-radius: 8px;
            padding: 0.75rem;
            background: #fafafa;
            margin-bottom: 0.5rem;
        }
        .sig-canvas-wrap.signed {
            border-style: solid;
            border-color: #4ade80;
            background: #f0fdf4;
        }
        .sig-canvas {
            width: 100%;
            height: 100px;
            background: white;
            border-radius: 4px;
            cursor: crosshair;
            display: block;
        }
        .sig-canvas.disabled {
            cursor: default;
            opacity: 0.7;
        }
        .sig-actions {
            display: flex;
            justify-content: center;
            gap: 0.5rem;
            margin-bottom: 0.75rem;
        }
        .sig-actions button {
            padding: 0.35rem 0.65rem;
            font-size: 0.7rem;
            border-radius: 4px;
            cursor: pointer;
            border: 1px solid #ddd;
            background: white;
            color: #333;
            font-family: inherit;
        }
        .sig-actions button:hover {
            border-color: #D4A853;
            color: #D4A853;
        }
        .sig-actions button.sign-btn {
            background: #D4A853;
            border-color: #D4A853;
            color: white;
        }
        .sig-actions button.sign-btn:hover {
            background: #c49843;
        }
        .sig-info input {
            width: 100%;
            padding: 0.5rem;
            border: 1px solid #ddd;
            border-radius: 4px;
            font-size: 0.85rem;
            margin-bottom: 0.5rem;
            text-align: center;
            font-family: inherit;
        }
        .sig-info input:focus {
            outline: none;
            border-color: #D4A853;
        }
        .sig-date {
            font-size: 0.8rem;
            color: #666;
            margin-top: 0.5rem;
        }
        .sig-status {
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 0.5rem;
            margin-top: 0.75rem;
            font-size: 0.8rem;
            font-weight: 500;
        }
        .sig-status.pending { color: #fbbf24; }
        .sig-status.signed { color: #4ade80; }

        /* ===== RESEARCH HUB ===== */
        .research-hub {
            position: fixed;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background: var(--bg-deep);
            z-index: 10000;
            display: flex;
            opacity: 0;
            visibility: hidden;
            transition: all 0.3s ease;
        }
        .research-hub.active {
            opacity: 1;
            visibility: visible;
        }
        .research-hub-sidebar {
            width: 300px;
            background: var(--bg-card);
            border-right: 1px solid var(--border-subtle);
            display: flex;
            flex-direction: column;
        }
        .research-hub-header {
            padding: 1.25rem;
            border-bottom: 1px solid var(--border-subtle);
        }
        .research-hub-header h2 {
            font-family: 'Space Grotesk', sans-serif;
            font-size: 1.1rem;
            color: var(--gold-primary);
            margin-bottom: 0.25rem;
            display: flex;
            align-items: center;
            gap: 0.5rem;
        }
        .research-hub-org {
            font-size: 0.9rem;
            color: var(--text-primary);
            margin-bottom: 0.25rem;
        }
        .research-hub-org-type {
            font-size: 0.75rem;
            color: var(--text-muted);
        }
        .research-progress {
            margin-top: 1rem;
            padding: 0.75rem;
            background: var(--bg-deep);
            border-radius: 8px;
        }
        .research-progress-label {
            display: flex;
            justify-content: space-between;
            font-size: 0.75rem;
            color: var(--text-muted);
            margin-bottom: 0.5rem;
        }
        .research-progress-bar {
            height: 6px;
            background: var(--bg-elevated);
            border-radius: 3px;
            overflow: hidden;
        }
        .research-progress-fill {
            height: 100%;
            background: linear-gradient(90deg, var(--gold-primary), var(--gold-light));
            border-radius: 3px;
            transition: width 0.3s ease;
        }
        .research-categories {
            flex: 1;
            overflow-y: auto;
            padding: 0.75rem;
        }
        .research-category {
            padding: 0.85rem;
            background: var(--bg-deep);
            border: 1px solid var(--border-subtle);
            border-radius: 8px;
            margin-bottom: 0.5rem;
            cursor: pointer;
            transition: all 0.2s ease;
            position: relative;
        }
        .research-category:hover {
            border-color: var(--gold-primary);
        }
        .research-category.active {
            border-color: var(--gold-primary);
            background: rgba(212, 168, 83, 0.1);
        }
        .research-category.has-data {
            border-left: 3px solid var(--success);
        }
        .research-category.has-data::after {
            content: '\2713';
            position: absolute;
            top: 0.5rem;
            right: 0.5rem;
            width: 18px;
            height: 18px;
            background: var(--success);
            color: white;
            border-radius: 50%;
            font-size: 0.65rem;
            display: flex;
            align-items: center;
            justify-content: center;
        }
        .research-category-icon {
            font-size: 1.25rem;
            margin-bottom: 0.35rem;
        }
        .research-category-title {
            font-weight: 600;
            color: var(--text-primary);
            font-size: 0.85rem;
            margin-bottom: 0.2rem;
        }
        .research-category-desc {
            font-size: 0.7rem;
            color: var(--text-muted);
            line-height: 1.4;
        }
        .research-hub-footer {
            padding: 0.75rem;
            border-top: 1px solid var(--border-subtle);
            display: flex;
            flex-direction: column;
            gap: 0.5rem;
        }
        .research-hub-main {
            flex: 1;
            display: flex;
            flex-direction: column;
            background: var(--bg-deep);
        }
        .research-hub-toolbar {
            display: flex;
            align-items: center;
            justify-content: space-between;
            padding: 1rem 1.5rem;
            background: var(--bg-card);
            border-bottom: 1px solid var(--border-subtle);
        }
        .research-toolbar-title {
            display: flex;
            align-items: center;
            gap: 0.75rem;
        }
        .research-toolbar-title h3 {
            font-size: 1.1rem;
            color: var(--text-primary);
            margin: 0;
        }
        .research-toolbar-title .category-icon {
            font-size: 1.5rem;
        }
        .research-hub-actions {
            display: flex;
            gap: 0.5rem;
        }
        .research-hub-content {
            flex: 1;
            padding: 1.5rem;
            overflow-y: auto;
        }
        .research-empty-state {
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            height: 100%;
            color: var(--text-muted);
            text-align: center;
        }
        .research-empty-state svg {
            width: 64px;
            height: 64px;
            margin-bottom: 1rem;
            opacity: 0.3;
        }
        .research-empty-state h3 {
            color: var(--text-secondary);
            margin-bottom: 0.5rem;
        }
        .research-query-section {
            margin-bottom: 1.5rem;
        }
        .research-query-label {
            display: flex;
            align-items: center;
            justify-content: space-between;
            margin-bottom: 0.5rem;
        }
        .research-query-label label {
            font-size: 0.8rem;
            color: var(--text-muted);
            text-transform: uppercase;
            letter-spacing: 0.05em;
        }
        .research-query-label button {
            font-size: 0.7rem;
            color: var(--gold-primary);
            background: none;
            border: none;
            cursor: pointer;
        }
        .research-query-label button:hover {
            text-decoration: underline;
        }
        .research-query-input {
            width: 100%;
            padding: 0.85rem 1rem;
            background: var(--bg-card);
            border: 1px solid var(--border-subtle);
            border-radius: 8px;
            color: var(--text-primary);
            font-size: 0.9rem;
            font-family: inherit;
            resize: vertical;
            min-height: 90px;
            line-height: 1.5;
        }
        .research-query-input:focus {
            outline: none;
            border-color: var(--gold-primary);
        }
        .research-results-section {
            background: var(--bg-card);
            border: 1px solid var(--border-subtle);
            border-radius: 10px;
            overflow: hidden;
            margin-bottom: 1.5rem;
        }
        .research-results-header {
            display: flex;
            align-items: center;
            justify-content: space-between;
            padding: 0.75rem 1rem;
            background: var(--bg-elevated);
            border-bottom: 1px solid var(--border-subtle);
        }
        .research-results-title {
            font-size: 0.85rem;
            font-weight: 600;
            color: var(--text-primary);
        }
        .research-results-meta {
            font-size: 0.7rem;
            color: var(--text-muted);
        }
        .research-results-content {
            padding: 1.25rem;
            font-size: 0.9rem;
            line-height: 1.7;
            color: var(--text-secondary);
            max-height: 350px;
            overflow-y: auto;
            white-space: pre-wrap;
        }
        .research-results-placeholder {
            text-align: center;
            padding: 2.5rem;
            color: var(--text-muted);
        }
        .research-results-placeholder svg {
            width: 40px;
            height: 40px;
            margin-bottom: 0.75rem;
            opacity: 0.4;
        }
        .research-loading {
            display: flex;
            flex-direction: column;
            align-items: center;
            padding: 2.5rem;
        }
        .research-notes-section {
            background: var(--bg-card);
            border: 1px solid var(--border-subtle);
            border-radius: 10px;
            overflow: hidden;
        }
        .research-notes-header {
            display: flex;
            align-items: center;
            justify-content: space-between;
            padding: 0.75rem 1rem;
            background: var(--bg-elevated);
            border-bottom: 1px solid var(--border-subtle);
        }
        .research-notes-title {
            font-size: 0.85rem;
            font-weight: 600;
            color: var(--text-primary);
        }
        .research-notes-content {
            padding: 1rem;
        }
        .research-notes-input {
            width: 100%;
            padding: 0.75rem;
            background: var(--bg-deep);
            border: 1px solid var(--border-subtle);
            border-radius: 6px;
            color: var(--text-primary);
            font-size: 0.85rem;
            font-family: inherit;
            min-height: 100px;
            resize: vertical;
            line-height: 1.5;
        }
        .research-notes-input:focus {
            outline: none;
            border-color: var(--gold-primary);
        }
        .research-hub-close {
            position: absolute;
            top: 1rem;
            right: 1rem;
            width: 40px;
            height: 40px;
            background: var(--bg-card);
            border: 1px solid var(--border-subtle);
            border-radius: 8px;
            color: var(--text-muted);
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            transition: all 0.2s ease;
        }
        .research-hub-close:hover {
            border-color: var(--error);
            color: var(--error);
        }
        .research-save-indicator {
            position: fixed;
            bottom: 2rem;
            right: 2rem;
            padding: 0.75rem 1.25rem;
            background: var(--success);
            color: white;
            border-radius: 8px;
            font-size: 0.85rem;
            display: flex;
            align-items: center;
            gap: 0.5rem;
            opacity: 0;
            transform: translateY(10px);
            transition: all 0.3s ease;
            z-index: 10001;
            pointer-events: none;
        }
        .research-save-indicator.visible {
            opacity: 1;
            transform: translateY(0);
            pointer-events: auto;
        }

        /* ===== PROPOSAL WIZARD ===== */
        .proposal-wizard {
            position: fixed;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background: rgba(0, 0, 0, 0.9);
            z-index: 10000;
            display: flex;
            align-items: center;
            justify-content: center;
            opacity: 0;
            visibility: hidden;
            transition: all 0.3s ease;
        }
        .proposal-wizard.active {
            opacity: 1;
            visibility: visible;
        }
        .proposal-wizard-content {
            width: 95vw;
            max-width: 1100px;
            height: 90vh;
            background: var(--bg-card);
            border-radius: 16px;
            display: flex;
            flex-direction: column;
            overflow: hidden;
            border: 1px solid var(--border-subtle);
        }
        
        /* Research Summary Grid */
        .research-summary-header {
            margin-bottom: 1.5rem;
        }
        .research-summary-header h3 {
            font-family: 'Space Grotesk', sans-serif;
            font-size: 1.1rem;
            color: var(--text-primary);
            margin-bottom: 0.5rem;
        }
        .research-summary-header p {
            color: var(--text-muted);
            font-size: 0.9rem;
        }
        .research-summary-grid {
            display: grid;
            grid-template-columns: repeat(2, 1fr);
            gap: 1rem;
        }
        .research-summary-card {
            background: var(--bg-deep);
            border: 1px solid var(--border-subtle);
            border-radius: 10px;
            padding: 1rem;
            transition: all 0.2s ease;
        }
        .research-summary-card.has-data {
            border-left: 3px solid var(--success);
        }
        .research-summary-card.no-data {
            border-left: 3px solid var(--warning);
            opacity: 0.7;
        }
        .research-summary-card-header {
            display: flex;
            align-items: center;
            justify-content: space-between;
            margin-bottom: 0.5rem;
        }
        .research-summary-card-title {
            display: flex;
            align-items: center;
            gap: 0.5rem;
            font-weight: 600;
            color: var(--text-primary);
            font-size: 0.9rem;
        }
        .research-summary-card-title .icon {
            font-size: 1.1rem;
        }
        .research-summary-card-status {
            font-size: 0.7rem;
            padding: 0.2rem 0.5rem;
            border-radius: 10px;
        }
        .research-summary-card-status.complete {
            background: var(--success-bg);
            color: var(--success);
        }
        .research-summary-card-status.missing {
            background: var(--warning-bg);
            color: var(--warning);
        }
        .research-summary-card-preview {
            font-size: 0.8rem;
            color: var(--text-muted);
            line-height: 1.5;
            max-height: 60px;
            overflow: hidden;
            text-overflow: ellipsis;
        }
        .research-summary-actions {
            margin-top: 1.5rem;
            padding: 1rem;
            background: var(--warning-bg);
            border: 1px solid rgba(251, 191, 36, 0.3);
            border-radius: 8px;
            display: flex;
            align-items: center;
            justify-content: space-between;
        }
        .research-summary-actions p {
            color: var(--warning);
            font-size: 0.85rem;
            display: flex;
            align-items: center;
            gap: 0.5rem;
        }
        
        /* Rationale Section */
        .rationale-section {
            background: var(--bg-deep);
            border: 1px solid var(--border-subtle);
            border-radius: 12px;
            padding: 1.25rem;
            margin-bottom: 1.5rem;
        }
        .rationale-header {
            display: flex;
            align-items: center;
            justify-content: space-between;
            margin-bottom: 0.75rem;
        }
        .rationale-title {
            display: flex;
            align-items: center;
            gap: 0.5rem;
            font-weight: 600;
            color: var(--gold-primary);
            font-size: 1rem;
        }
        .rationale-description {
            color: var(--text-muted);
            font-size: 0.85rem;
            margin-bottom: 1rem;
            line-height: 1.5;
        }
        .rationale-input {
            width: 100%;
            min-height: 200px;
            padding: 1rem;
            background: var(--bg-card);
            border: 1px solid var(--border-subtle);
            border-radius: 8px;
            color: var(--text-primary);
            font-size: 0.9rem;
            font-family: inherit;
            line-height: 1.6;
            resize: vertical;
        }
        .rationale-input:focus {
            outline: none;
            border-color: var(--gold-primary);
        }
        .rationale-input::placeholder {
            color: var(--text-muted);
            opacity: 0.7;
        }
        
        /* Proposal Preview */
        .proposal-preview-wrapper {
            display: flex;
            gap: 1.5rem;
            height: 100%;
        }
        .proposal-preview-document {
            flex: 1;
            background: white;
            border-radius: 8px;
            overflow-y: auto;
            box-shadow: 0 4px 20px rgba(0,0,0,0.2);
        }
        .proposal-preview-actions {
            width: 280px;
            display: flex;
            flex-direction: column;
            gap: 1rem;
        }
        .proposal-action-card {
            background: var(--bg-card);
            border: 1px solid var(--border-subtle);
            border-radius: 10px;
            padding: 1.25rem;
        }
        .proposal-action-card h4 {
            font-size: 0.85rem;
            color: var(--text-primary);
            margin-bottom: 1rem;
            display: flex;
            align-items: center;
            gap: 0.5rem;
        }
        .proposal-action-btn {
            width: 100%;
            padding: 0.75rem 1rem;
            margin-bottom: 0.5rem;
            background: var(--bg-deep);
            border: 1px solid var(--border-subtle);
            border-radius: 6px;
            color: var(--text-primary);
            font-size: 0.85rem;
            cursor: pointer;
            display: flex;
            align-items: center;
            gap: 0.5rem;
            transition: all 0.2s ease;
        }
        .proposal-action-btn:hover {
            border-color: var(--gold-primary);
            color: var(--gold-primary);
        }
        .proposal-action-btn.primary {
            background: var(--gold-primary);
            border-color: var(--gold-primary);
            color: var(--bg-deep);
        }
        .proposal-action-btn.primary:hover {
            background: var(--gold-light);
        }
        .proposal-action-btn:last-child {
            margin-bottom: 0;
        }
        .proposal-action-btn svg {
            width: 16px;
            height: 16px;
        }
        
        /* ===== DOCUMENT REVIEW WITH SIDENOTES ===== */
        .doc-review {
            position: fixed;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background: var(--bg-deep);
            z-index: 10000;
            display: flex;
            opacity: 0;
            visibility: hidden;
            transition: all 0.3s ease;
        }
        .doc-review.active {
            opacity: 1;
            visibility: visible;
        }
        .doc-review-main {
            flex: 1;
            display: flex;
            flex-direction: column;
            background: #e5e5e5;
        }
        .doc-review-toolbar {
            display: flex;
            align-items: center;
            justify-content: space-between;
            padding: 0.75rem 1.5rem;
            background: var(--bg-card);
            border-bottom: 1px solid var(--border-subtle);
        }
        .doc-review-toolbar-left {
            display: flex;
            align-items: center;
            gap: 1rem;
        }
        .doc-review-title {
            font-family: 'Space Grotesk', sans-serif;
            font-size: 1rem;
            color: var(--gold-primary);
        }
        .doc-review-org {
            font-size: 0.85rem;
            color: var(--text-secondary);
        }
        .doc-review-status {
            display: flex;
            align-items: center;
            gap: 0.5rem;
        }
        .doc-status-badge {
            padding: 0.35rem 0.75rem;
            border-radius: 20px;
            font-size: 0.75rem;
            font-weight: 600;
            display: flex;
            align-items: center;
            gap: 0.35rem;
        }
        .doc-status-badge.draft {
            background: var(--warning-bg);
            color: var(--warning);
        }
        .doc-status-badge.review {
            background: var(--info-bg);
            color: var(--info);
        }
        .doc-status-badge.pending-signature {
            background: rgba(168, 85, 247, 0.15);
            color: #a855f7;
        }
        .doc-status-badge.executed {
            background: var(--success-bg);
            color: var(--success);
        }
        .doc-review-toolbar-right {
            display: flex;
            align-items: center;
            gap: 0.5rem;
        }
        .doc-review-content {
            flex: 1;
            overflow-y: auto;
            padding: 2rem;
            display: flex;
            justify-content: center;
        }
        .doc-review-wrapper {
            width: 100%;
            max-width: 850px;
        }
        .doc-review-document {
            background: white;
            color: #1a1a1a;
            padding: 3rem;
            border-radius: 4px;
            box-shadow: 0 2px 10px rgba(0,0,0,0.15);
            font-family: 'Inter', sans-serif;
            line-height: 1.8;
            font-size: 1rem;
        }
        .doc-review-document h1 {
            font-family: 'Space Grotesk', sans-serif;
            color: #1a1a1a;
            border-bottom: 2px solid #D4A853;
            padding-bottom: 0.75rem;
            margin-bottom: 1.5rem;
            font-size: 1.75rem;
        }
        .doc-review-document h2 {
            font-family: 'Space Grotesk', sans-serif;
            color: #333;
            margin-top: 2rem;
            margin-bottom: 1rem;
            font-size: 1.25rem;
            position: relative;
            cursor: pointer;
        }
        .doc-review-document h2:hover {
            color: #D4A853;
        }
        .doc-review-document h2::after {
            content: '+';
            position: absolute;
            right: 0;
            top: 50%;
            transform: translateY(-50%);
            width: 24px;
            height: 24px;
            background: #f5f5f5;
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 1rem;
            color: #999;
            opacity: 0;
            transition: opacity 0.2s ease;
        }
        .doc-review-document h2:hover::after {
            opacity: 1;
        }
        .doc-review-document h3 {
            color: #444;
            margin-top: 1.5rem;
            margin-bottom: 0.75rem;
            font-size: 1.1rem;
        }
        .doc-review-document p {
            margin-bottom: 1rem;
        }
        .doc-review-document ul, .doc-review-document ol {
            margin-bottom: 1rem;
            padding-left: 1.5rem;
        }
        .doc-review-document li {
            margin-bottom: 0.5rem;
        }
        .doc-review-document table {
            width: 100%;
            border-collapse: collapse;
            margin: 1.5rem 0;
        }
        .doc-review-document th, .doc-review-document td {
            border: 1px solid #ddd;
            padding: 0.75rem;
            text-align: left;
        }
        .doc-review-document th {
            background: #f8f8f8;
            font-weight: 600;
        }
        .doc-section-highlight {
            background: rgba(212, 168, 83, 0.1);
            margin: -0.5rem;
            padding: 0.5rem;
            border-radius: 4px;
            border-left: 3px solid #D4A853;
        }
        
        /* Sidenotes Panel */
        .sidenotes-panel {
            width: 380px;
            background: var(--bg-card);
            border-left: 1px solid var(--border-subtle);
            display: flex;
            flex-direction: column;
        }
        .sidenotes-header {
            padding: 1rem 1.25rem;
            border-bottom: 1px solid var(--border-subtle);
            display: flex;
            align-items: center;
            justify-content: space-between;
        }
        .sidenotes-header h3 {
            font-size: 0.95rem;
            color: var(--text-primary);
            display: flex;
            align-items: center;
            gap: 0.5rem;
        }
        .sidenotes-count {
            background: var(--gold-primary);
            color: var(--bg-deep);
            padding: 0.15rem 0.5rem;
            border-radius: 10px;
            font-size: 0.7rem;
            font-weight: 600;
        }
        .sidenotes-filter {
            display: flex;
            gap: 0.5rem;
            padding: 0.75rem 1rem;
            border-bottom: 1px solid var(--border-subtle);
        }
        .sidenotes-filter-btn {
            padding: 0.35rem 0.65rem;
            background: var(--bg-deep);
            border: 1px solid var(--border-subtle);
            border-radius: 15px;
            color: var(--text-muted);
            font-size: 0.7rem;
            cursor: pointer;
            transition: all 0.2s ease;
        }
        .sidenotes-filter-btn:hover {
            border-color: var(--gold-primary);
            color: var(--gold-primary);
        }
        .sidenotes-filter-btn.active {
            background: var(--gold-primary);
            border-color: var(--gold-primary);
            color: var(--bg-deep);
        }
        .sidenotes-list {
            flex: 1;
            overflow-y: auto;
            padding: 0.75rem;
        }
        .sidenote-item {
            background: var(--bg-deep);
            border: 1px solid var(--border-subtle);
            border-radius: 10px;
            padding: 0.85rem;
            margin-bottom: 0.75rem;
            transition: all 0.2s ease;
        }
        .sidenote-item:hover {
            border-color: var(--border-strong);
        }
        .sidenote-item.from-partner {
            border-left: 3px solid var(--info);
        }
        .sidenote-item.from-luminary {
            border-left: 3px solid var(--gold-primary);
        }
        .sidenote-item.resolved {
            opacity: 0.6;
        }
        .sidenote-header {
            display: flex;
            align-items: center;
            justify-content: space-between;
            margin-bottom: 0.5rem;
        }
        .sidenote-author {
            display: flex;
            align-items: center;
            gap: 0.5rem;
        }
        .sidenote-author-avatar {
            width: 24px;
            height: 24px;
            border-radius: 50%;
            background: var(--gold-primary);
            color: var(--bg-deep);
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 0.65rem;
            font-weight: 600;
        }
        .sidenote-author-avatar.partner {
            background: var(--info);
        }
        .sidenote-author-name {
            font-size: 0.8rem;
            font-weight: 600;
            color: var(--text-primary);
        }
        .sidenote-time {
            font-size: 0.65rem;
            color: var(--text-muted);
        }
        .sidenote-section {
            font-size: 0.7rem;
            color: var(--gold-primary);
            margin-bottom: 0.5rem;
            display: flex;
            align-items: center;
            gap: 0.35rem;
        }
        .sidenote-content {
            font-size: 0.85rem;
            color: var(--text-secondary);
            line-height: 1.5;
        }
        .sidenote-actions {
            display: flex;
            gap: 0.5rem;
            margin-top: 0.75rem;
            padding-top: 0.75rem;
            border-top: 1px solid var(--border-subtle);
        }
        .sidenote-action-btn {
            padding: 0.3rem 0.5rem;
            background: transparent;
            border: 1px solid var(--border-subtle);
            border-radius: 4px;
            color: var(--text-muted);
            font-size: 0.7rem;
            cursor: pointer;
            display: flex;
            align-items: center;
            gap: 0.25rem;
            transition: all 0.2s ease;
        }
        .sidenote-action-btn:hover {
            border-color: var(--gold-primary);
            color: var(--gold-primary);
        }
        .sidenote-action-btn.resolve:hover {
            border-color: var(--success);
            color: var(--success);
        }
        .sidenotes-empty {
            text-align: center;
            padding: 2rem;
            color: var(--text-muted);
        }
        .sidenotes-empty svg {
            width: 40px;
            height: 40px;
            margin-bottom: 0.75rem;
            opacity: 0.4;
        }
        .sidenotes-compose {
            padding: 1rem;
            border-top: 1px solid var(--border-subtle);
            background: var(--bg-elevated);
        }
        .sidenotes-compose-section {
            margin-bottom: 0.75rem;
        }
        .sidenotes-compose-section label {
            font-size: 0.7rem;
            color: var(--text-muted);
            text-transform: uppercase;
            letter-spacing: 0.05em;
            display: block;
            margin-bottom: 0.35rem;
        }
        .sidenotes-compose-section select {
            width: 100%;
            padding: 0.5rem;
            background: var(--bg-input);
            border: 1px solid var(--border-subtle);
            border-radius: 6px;
            color: var(--text-primary);
            font-size: 0.8rem;
        }
        .sidenotes-compose textarea {
            width: 100%;
            padding: 0.75rem;
            background: var(--bg-input);
            border: 1px solid var(--border-subtle);
            border-radius: 8px;
            color: var(--text-primary);
            font-size: 0.85rem;
            resize: none;
            min-height: 80px;
            font-family: inherit;
            line-height: 1.5;
        }
        .sidenotes-compose textarea:focus {
            outline: none;
            border-color: var(--gold-primary);
        }
        .sidenotes-compose-actions {
            display: flex;
            justify-content: flex-end;
            margin-top: 0.75rem;
        }
        
        /* ===== ELECTRONIC SIGNATURES ===== */
        .signature-section {
            margin-top: 3rem;
            padding-top: 2rem;
            border-top: 2px solid #D4A853;
        }
        .signature-section-title {
            font-family: 'Space Grotesk', sans-serif;
            font-size: 1.25rem;
            color: #333;
            margin-bottom: 0.5rem;
        }
        .signature-section-desc {
            font-size: 0.9rem;
            color: #666;
            margin-bottom: 1.5rem;
        }
        .signature-blocks {
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 2.5rem;
        }
        .signature-block {
            text-align: center;
        }
        .signature-block-title {
            font-weight: 600;
            color: #333;
            margin-bottom: 1rem;
            font-size: 1rem;
        }
        .signature-canvas-container {
            border: 2px dashed #ccc;
            border-radius: 8px;
            padding: 0.75rem;
            background: #fafafa;
            margin-bottom: 0.75rem;
            transition: all 0.2s ease;
        }
        .signature-canvas-container:hover {
            border-color: #D4A853;
        }
        .signature-canvas-container.signed {
            border-style: solid;
            border-color: #4ade80;
            background: rgba(74, 222, 128, 0.05);
        }
        .signature-canvas-container.signing {
            border-color: #D4A853;
            background: white;
        }
        .signature-canvas {
            width: 100%;
            height: 100px;
            background: white;
            border-radius: 4px;
            cursor: crosshair;
            touch-action: none;
        }
        .signature-canvas.disabled {
            cursor: default;
            opacity: 0.7;
        }
        .signature-placeholder {
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            height: 100px;
            color: #999;
            font-size: 0.85rem;
        }
        .signature-placeholder svg {
            width: 32px;
            height: 32px;
            margin-bottom: 0.5rem;
            opacity: 0.4;
        }
        .signature-actions {
            display: flex;
            justify-content: center;
            gap: 0.5rem;
            margin-bottom: 1rem;
        }
        .signature-action-btn {
            padding: 0.4rem 0.75rem;
            font-size: 0.75rem;
            border-radius: 4px;
            cursor: pointer;
            border: 1px solid #ddd;
            background: white;
            color: #333;
            display: flex;
            align-items: center;
            gap: 0.35rem;
            transition: all 0.2s ease;
        }
        .signature-action-btn:hover {
            border-color: #D4A853;
            color: #D4A853;
        }
        .signature-action-btn.sign {
            background: #D4A853;
            border-color: #D4A853;
            color: white;
        }
        .signature-action-btn.sign:hover {
            background: #c49643;
        }
        .signature-action-btn svg {
            width: 12px;
            height: 12px;
        }
        .signature-info {
            margin-top: 0.75rem;
        }
        .signature-info-row {
            margin-bottom: 0.5rem;
        }
        .signature-info-row label {
            display: block;
            font-size: 0.7rem;
            color: #888;
            margin-bottom: 0.2rem;
            text-align: left;
        }
        .signature-info-row input {
            width: 100%;
            padding: 0.5rem;
            border: 1px solid #ddd;
            border-radius: 4px;
            font-size: 0.85rem;
            text-align: center;
        }
        .signature-info-row input:focus {
            outline: none;
            border-color: #D4A853;
        }
        .signature-info-row input:disabled {
            background: #f5f5f5;
            color: #666;
        }
        .signature-date {
            font-size: 0.8rem;
            color: #666;
            margin-top: 0.75rem;
        }
        .signature-status {
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 0.5rem;
            margin-top: 0.75rem;
            padding: 0.5rem;
            border-radius: 6px;
            font-size: 0.8rem;
            font-weight: 500;
        }
        .signature-status.pending {
            background: rgba(251, 191, 36, 0.1);
            color: #d97706;
        }
        .signature-status.signed {
            background: rgba(74, 222, 128, 0.1);
            color: #16a34a;
        }
        .signature-status svg {
            width: 14px;
            height: 14px;
        }
        
        /* Signature Modal for full-screen signing */
        .signature-modal {
            position: fixed;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background: rgba(0, 0, 0, 0.9);
            z-index: 10001;
            display: flex;
            align-items: center;
            justify-content: center;
            opacity: 0;
            visibility: hidden;
            transition: all 0.3s ease;
        }
        .signature-modal.active {
            opacity: 1;
            visibility: visible;
        }
        .signature-modal-content {
            background: white;
            border-radius: 12px;
            padding: 2rem;
            width: 90vw;
            max-width: 600px;
            text-align: center;
        }
        .signature-modal-title {
            font-family: 'Space Grotesk', sans-serif;
            font-size: 1.25rem;
            color: #333;
            margin-bottom: 0.5rem;
        }
        .signature-modal-desc {
            color: #666;
            font-size: 0.9rem;
            margin-bottom: 1.5rem;
        }
        .signature-modal-canvas-container {
            border: 2px solid #D4A853;
            border-radius: 8px;
            padding: 0.5rem;
            background: #fafafa;
            margin-bottom: 1rem;
        }
        .signature-modal-canvas {
            width: 100%;
            height: 150px;
            background: white;
            border-radius: 4px;
            cursor: crosshair;
            touch-action: none;
        }
        .signature-modal-hint {
            font-size: 0.75rem;
            color: #999;
            margin-bottom: 1.5rem;
        }
        .signature-modal-actions {
            display: flex;
            justify-content: center;
            gap: 1rem;
        }
        .signature-modal-btn {
            padding: 0.75rem 1.5rem;
            border-radius: 6px;
            font-size: 0.9rem;
            cursor: pointer;
            display: flex;
            align-items: center;
            gap: 0.5rem;
            transition: all 0.2s ease;
        }
        .signature-modal-btn.cancel {
            background: white;
            border: 1px solid #ddd;
            color: #666;
        }
        .signature-modal-btn.cancel:hover {
            border-color: #999;
        }
        .signature-modal-btn.clear {
            background: white;
            border: 1px solid #ddd;
            color: #666;
        }
        .signature-modal-btn.apply {
            background: #D4A853;
            border: 1px solid #D4A853;
            color: white;
        }
        .signature-modal-btn.apply:hover {
            background: #c49643;
        }
        .signature-modal-btn svg {
            width: 16px;
            height: 16px;
        }
        
        @keyframes slideUp {
            from { transform: translateX(-50%) translateY(20px); opacity: 0; }
            to { transform: translateX(-50%) translateY(0); opacity: 1; }
        }
        @keyframes fadeOut {
            from { opacity: 1; }
            to { opacity: 0; }
        }
        .proposal-wizard-header {
            display: flex;
            align-items: center;
            justify-content: space-between;
            padding: 1rem 1.5rem;
            background: linear-gradient(135deg, var(--bg-deep) 0%, var(--bg-card) 100%);
            border-bottom: 1px solid var(--border-subtle);
        }
        .proposal-wizard-header h2 {
            font-family: 'Space Grotesk', sans-serif;
            font-size: 1.2rem;
            color: var(--gold-primary);
            display: flex;
            align-items: center;
            gap: 0.75rem;
        }
        .proposal-wizard-steps {
            display: flex;
            align-items: center;
            gap: 0.5rem;
        }
        .wizard-step {
            display: flex;
            align-items: center;
            gap: 0.5rem;
            padding: 0.4rem 0.75rem;
            background: var(--bg-deep);
            border-radius: 20px;
            font-size: 0.75rem;
            color: var(--text-muted);
            transition: all 0.2s ease;
        }
        .wizard-step.active {
            background: var(--gold-primary);
            color: var(--bg-deep);
        }
        .wizard-step.completed {
            background: rgba(34, 197, 94, 0.2);
            color: var(--success);
        }
        .wizard-step-num {
            width: 20px;
            height: 20px;
            border-radius: 50%;
            background: rgba(255,255,255,0.1);
            display: flex;
            align-items: center;
            justify-content: center;
            font-weight: 600;
            font-size: 0.7rem;
        }
        .wizard-step.active .wizard-step-num {
            background: rgba(0,0,0,0.2);
        }
        .proposal-wizard-body {
            flex: 1;
            overflow-y: auto;
            padding: 1.5rem;
        }
        .proposal-wizard-footer {
            display: flex;
            justify-content: space-between;
            padding: 1rem 1.5rem;
            background: var(--bg-deep);
            border-top: 1px solid var(--border-subtle);
        }
        
        /* Research Prompts Section */
        .research-prompts {
            display: flex;
            flex-direction: column;
            gap: 1rem;
        }
        .research-prompt-item {
            background: var(--bg-deep);
            border: 1px solid var(--border-subtle);
            border-radius: 10px;
            padding: 1rem;
            transition: all 0.2s ease;
        }
        .research-prompt-item.completed {
            border-color: var(--success);
            background: rgba(34, 197, 94, 0.05);
        }
        .research-prompt-item.loading {
            border-color: var(--gold-primary);
            background: rgba(212, 168, 83, 0.05);
        }
        .research-prompt-header {
            display: flex;
            align-items: center;
            justify-content: space-between;
            margin-bottom: 0.75rem;
        }
        .research-prompt-title {
            font-weight: 600;
            color: var(--text-primary);
            display: flex;
            align-items: center;
            gap: 0.5rem;
        }
        .research-prompt-title svg {
            width: 16px;
            height: 16px;
            color: var(--gold-primary);
        }
        .research-prompt-actions {
            display: flex;
            gap: 0.5rem;
        }
        .research-prompt-actions button {
            padding: 0.35rem 0.6rem;
            background: transparent;
            border: 1px solid var(--border-subtle);
            border-radius: 4px;
            color: var(--text-muted);
            font-size: 0.7rem;
            cursor: pointer;
            transition: all 0.2s ease;
        }
        .research-prompt-actions button:hover {
            border-color: var(--gold-primary);
            color: var(--gold-primary);
        }
        .research-prompt-input {
            width: 100%;
            padding: 0.6rem 0.75rem;
            background: var(--bg-input);
            border: 1px solid var(--border-subtle);
            border-radius: 6px;
            color: var(--text-primary);
            font-size: 0.85rem;
            font-family: inherit;
            margin-bottom: 0.5rem;
        }
        .research-prompt-input:focus {
            outline: none;
            border-color: var(--gold-primary);
        }
        .research-result {
            background: var(--bg-card);
            border-radius: 6px;
            padding: 0.75rem;
            font-size: 0.85rem;
            line-height: 1.6;
            color: var(--text-secondary);
            max-height: 200px;
            overflow-y: auto;
            white-space: pre-wrap;
        }
        .research-result-placeholder {
            color: var(--text-muted);
            font-style: italic;
            text-align: center;
            padding: 1rem;
        }
        .add-prompt-btn {
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 0.5rem;
            padding: 0.75rem;
            background: transparent;
            border: 2px dashed var(--border-subtle);
            border-radius: 10px;
            color: var(--text-muted);
            font-size: 0.85rem;
            cursor: pointer;
            transition: all 0.2s ease;
        }
        .add-prompt-btn:hover {
            border-color: var(--gold-primary);
            color: var(--gold-primary);
        }
        
        /* Proposal Config Section */
        .proposal-config {
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 1.5rem;
        }
        .config-section {
            background: var(--bg-deep);
            border: 1px solid var(--border-subtle);
            border-radius: 10px;
            padding: 1.25rem;
        }
        .config-section-title {
            font-weight: 600;
            color: var(--gold-primary);
            margin-bottom: 1rem;
            font-size: 0.9rem;
            display: flex;
            align-items: center;
            gap: 0.5rem;
        }
        .config-field {
            margin-bottom: 1rem;
        }
        .config-field:last-child {
            margin-bottom: 0;
        }
        .config-field label {
            display: block;
            font-size: 0.75rem;
            color: var(--text-muted);
            margin-bottom: 0.4rem;
            text-transform: uppercase;
            letter-spacing: 0.05em;
        }
        .config-field input,
        .config-field select,
        .config-field textarea {
            width: 100%;
            padding: 0.6rem 0.75rem;
            background: var(--bg-input);
            border: 1px solid var(--border-subtle);
            border-radius: 6px;
            color: var(--text-primary);
            font-size: 0.9rem;
            font-family: inherit;
        }
        .config-field textarea {
            min-height: 100px;
            resize: vertical;
        }
        .config-field input:focus,
        .config-field select:focus,
        .config-field textarea:focus {
            outline: none;
            border-color: var(--gold-primary);
            box-shadow: 0 0 0 2px rgba(212, 175, 55, 0.15);
        }
        .tier-options {
            display: flex;
            gap: 0.75rem;
        }
        .tier-option {
            flex: 1;
            padding: 0.75rem;
            background: var(--bg-card);
            border: 2px solid var(--border-subtle);
            border-radius: 8px;
            text-align: center;
            cursor: pointer;
            transition: all 0.2s ease;
        }
        .tier-option:hover {
            border-color: var(--gold-primary);
        }
        .tier-option.selected {
            border-color: var(--gold-primary);
            background: rgba(212, 168, 83, 0.1);
        }
        .tier-option-name {
            font-weight: 600;
            color: var(--text-primary);
            margin-bottom: 0.25rem;
        }
        .tier-option-price {
            font-size: 0.8rem;
            color: var(--gold-primary);
        }
        
        /* Smart Tier Recommendation */
        .tier-recommendation {
            background: linear-gradient(135deg, rgba(212, 175, 55, 0.15) 0%, rgba(212, 175, 55, 0.05) 100%);
            border: 1px solid var(--gold-primary);
            border-radius: 10px;
            padding: 1rem;
            margin-bottom: 1.5rem;
        }
        .tier-recommendation-header {
            display: flex;
            align-items: center;
            gap: 0.5rem;
            font-weight: 600;
            color: var(--gold-primary);
            margin-bottom: 0.5rem;
        }
        .tier-recommendation-content {
            font-size: 0.9rem;
            color: var(--text-secondary);
        }
        
        /* Toggle Switch */
        .toggle-switch {
            position: relative;
            display: inline-block;
            width: 50px;
            height: 26px;
        }
        .toggle-switch input {
            opacity: 0;
            width: 0;
            height: 0;
        }
        .toggle-slider {
            position: absolute;
            cursor: pointer;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background-color: var(--bg-card);
            border: 1px solid var(--border-subtle);
            transition: 0.3s;
            border-radius: 26px;
        }
        .toggle-slider:before {
            position: absolute;
            content: "";
            height: 20px;
            width: 20px;
            left: 2px;
            bottom: 2px;
            background-color: var(--text-secondary);
            transition: 0.3s;
            border-radius: 50%;
        }
        .toggle-switch input:checked + .toggle-slider {
            background-color: var(--gold-primary);
            border-color: var(--gold-primary);
        }
        .toggle-switch input:checked + .toggle-slider:before {
            transform: translateX(24px);
            background-color: white;
        }
        
        /* Proposal Preview */
        .proposal-preview {
            background: white;
            color: #1a1a1a;
            padding: 2rem;
            border-radius: 8px;
            max-height: 100%;
            overflow-y: auto;
            font-family: 'Inter', sans-serif;
            line-height: 1.7;
        }
        .proposal-preview h1 {
            font-family: 'Space Grotesk', sans-serif;
            color: #1a1a1a;
            border-bottom: 2px solid #D4A853;
            padding-bottom: 0.5rem;
            margin-bottom: 1.5rem;
        }
        .proposal-preview h2 {
            font-family: 'Space Grotesk', sans-serif;
            color: #333;
            margin-top: 1.5rem;
            margin-bottom: 0.75rem;
        }
        .proposal-preview .proposal-header {
            text-align: center;
            margin-bottom: 2rem;
        }
        .proposal-preview .proposal-logo {
            font-family: 'Space Grotesk', sans-serif;
            font-size: 1.5rem;
            color: #D4A853;
            letter-spacing: 0.2em;
        }
        .proposal-preview table {
            width: 100%;
            border-collapse: collapse;
            margin: 1rem 0;
        }
        .proposal-preview th,
        .proposal-preview td {
            border: 1px solid #ddd;
            padding: 0.75rem;
            text-align: left;
        }
        .proposal-preview th {
            background: #f5f5f5;
        }
        .proposal-preview .signature-block {
            margin-top: 3rem;
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 2rem;
        }
        .proposal-preview .signature-line {
            border-top: 1px solid #333;
            padding-top: 0.5rem;
            margin-top: 3rem;
        }
        .proposal-generating {
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            padding: 4rem;
            color: var(--text-muted);
        }
        .proposal-generating .press-sending-spinner {
            margin-bottom: 1rem;
        }
        
        /* ===== OUTREACH COMMAND CENTER ===== */
        .outreach-center-modal {
            position: fixed;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background: linear-gradient(145deg, #0a0a0f 0%, #0f0f18 50%, #0a0a12 100%);
            z-index: 10000;
            display: none;
            flex-direction: column;
            overflow: hidden;
        }
        .outreach-center-modal.active { display: flex; }
        
        .oc-container {
            display: flex;
            flex-direction: column;
            height: 100%;
            overflow: hidden;
            position: relative;
        }
        
        .oc-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 1rem 1.5rem;
            background: rgba(0,0,0,0.3);
            border-bottom: 1px solid var(--border-subtle);
        }
        
        .oc-header-left {
            display: flex;
            align-items: center;
            gap: 1rem;
        }
        
        .oc-logo {
            font-size: 2rem;
        }
        
        .oc-title h1 {
            font-family: 'Space Grotesk', sans-serif;
            font-size: 1.5rem;
            color: var(--gold-primary);
            margin: 0;
        }
        
        .oc-title p {
            font-size: 0.8rem;
            color: var(--text-muted);
            margin: 0;
        }
        
        .oc-header-right {
            display: flex;
            align-items: center;
            gap: 2rem;
        }
        
        .oc-stats {
            display: flex;
            gap: 1.5rem;
        }
        
        .oc-stat {
            text-align: center;
        }
        
        .oc-stat-value {
            display: block;
            font-size: 1.5rem;
            font-weight: 600;
            color: var(--gold-primary);
        }
        
        .oc-stat-label {
            font-size: 0.7rem;
            color: var(--text-muted);
            text-transform: uppercase;
            letter-spacing: 0.05em;
        }
        
        .oc-close-btn {
            background: none;
            border: none;
            color: var(--text-muted);
            cursor: pointer;
            padding: 0.5rem;
            border-radius: 8px;
            transition: all 0.2s ease;
        }
        
        .oc-close-btn:hover {
            background: rgba(255,255,255,0.1);
            color: var(--text-primary);
        }
        
        .oc-nav {
            display: flex;
            gap: 0.5rem;
            padding: 0.75rem 1.5rem;
            background: rgba(0,0,0,0.2);
            border-bottom: 1px solid var(--border-subtle);
        }
        
        .oc-nav-tab {
            display: flex;
            align-items: center;
            gap: 0.5rem;
            padding: 0.6rem 1rem;
            background: none;
            border: 1px solid transparent;
            border-radius: 8px;
            color: var(--text-secondary);
            cursor: pointer;
            font-size: 0.85rem;
            transition: all 0.2s ease;
        }
        
        .oc-nav-tab:hover {
            background: rgba(255,255,255,0.05);
            color: var(--text-primary);
        }
        
        .oc-nav-tab.active {
            background: rgba(212,168,83,0.15);
            border-color: rgba(212,168,83,0.3);
            color: var(--gold-primary);
        }
        
        .oc-nav-badge {
            background: var(--gold-primary);
            color: var(--bg-deep);
            font-size: 0.7rem;
            font-weight: 600;
            padding: 0.15rem 0.4rem;
            border-radius: 10px;
            min-width: 20px;
            text-align: center;
        }
        
        .oc-content {
            flex: 1;
            overflow: hidden;
            padding: 1rem;
        }
        
        .oc-tab-content {
            display: none;
            height: 100%;
            overflow: hidden;
        }
        
        .oc-tab-content.active {
            display: flex;
        }
        
        /* Batch Operations Layout */
        .oc-batch-layout {
            display: grid;
            grid-template-columns: 1fr 400px;
            gap: 1rem;
            height: 100%;
            overflow: hidden;
        }
        
        .oc-batch-selection {
            display: flex;
            flex-direction: column;
            gap: 1rem;
            overflow: hidden;
        }
        
        .oc-batch-actions {
            display: flex;
            flex-direction: column;
            gap: 1rem;
        }
        
        .oc-panel {
            background: var(--bg-card);
            border: 1px solid var(--border-subtle);
            border-radius: 12px;
            overflow: hidden;
        }
        
        .oc-panel-header {
            padding: 0.75rem 1rem;
            background: rgba(0,0,0,0.2);
            border-bottom: 1px solid var(--border-subtle);
            display: flex;
            justify-content: space-between;
            align-items: center;
        }
        
        .oc-panel-header h3 {
            font-size: 0.9rem;
            font-weight: 600;
            color: var(--text-primary);
            margin: 0;
        }
        
        .oc-panel-body {
            padding: 1rem;
        }
        
        .oc-field-group {
            margin-bottom: 1rem;
        }
        
        .oc-field-group:last-child {
            margin-bottom: 0;
        }
        
        .oc-field-group label {
            display: block;
            font-size: 0.75rem;
            color: var(--text-muted);
            margin-bottom: 0.4rem;
            text-transform: uppercase;
            letter-spacing: 0.05em;
        }
        
        .oc-field-group select,
        .oc-field-group input[type="text"],
        .oc-field-group input[type="datetime-local"] {
            width: 100%;
            padding: 0.5rem 0.75rem;
            background: var(--bg-input);
            border: 1px solid var(--border-subtle);
            border-radius: 6px;
            color: var(--text-primary);
            font-size: 0.85rem;
        }
        
        .oc-type-chips,
        .oc-filter-chips {
            display: flex;
            flex-wrap: wrap;
            gap: 0.5rem;
        }
        
        .oc-type-chip,
        .oc-filter-chip {
            padding: 0.4rem 0.75rem;
            background: rgba(255,255,255,0.05);
            border: 1px solid var(--border-subtle);
            border-radius: 20px;
            color: var(--text-secondary);
            font-size: 0.8rem;
            cursor: pointer;
            transition: all 0.2s ease;
        }
        
        .oc-type-chip:hover,
        .oc-filter-chip:hover {
            background: rgba(255,255,255,0.1);
            color: var(--text-primary);
        }
        
        .oc-type-chip.active {
            background: rgba(212,168,83,0.2);
            border-color: var(--gold-primary);
            color: var(--gold-primary);
        }
        
        .oc-filter-chip.active {
            background: rgba(59,130,246,0.2);
            border-color: #60a5fa;
            color: #60a5fa;
        }
        
        .oc-status-filters {
            display: flex;
            flex-direction: column;
            gap: 0.5rem;
        }
        
        .oc-checkbox,
        .oc-radio {
            display: flex;
            align-items: center;
            gap: 0.5rem;
            font-size: 0.85rem;
            color: var(--text-secondary);
            cursor: pointer;
        }
        
        .oc-checkbox input,
        .oc-radio input {
            accent-color: var(--gold-primary);
        }
        
        .oc-quick-actions {
            display: flex;
            gap: 0.5rem;
            margin-top: 0.5rem;
        }
        
        .oc-quick-btn {
            padding: 0.35rem 0.6rem;
            background: rgba(255,255,255,0.05);
            border: 1px solid var(--border-subtle);
            border-radius: 4px;
            color: var(--text-muted);
            font-size: 0.75rem;
            cursor: pointer;
            transition: all 0.2s ease;
        }
        
        .oc-quick-btn:hover {
            background: rgba(255,255,255,0.1);
            color: var(--text-primary);
        }
        
        .oc-org-list-panel {
            flex: 1;
            display: flex;
            flex-direction: column;
            overflow: hidden;
        }
        
        .oc-selected-count {
            font-size: 0.8rem;
            color: var(--gold-primary);
        }
        
        .oc-org-list {
            flex: 1;
            overflow-y: auto;
            padding: 0.5rem;
        }
        
        .oc-org-item {
            display: flex;
            align-items: center;
            gap: 0.75rem;
            padding: 0.6rem 0.75rem;
            border-radius: 8px;
            cursor: pointer;
            transition: all 0.2s ease;
            border: 1px solid transparent;
        }
        
        .oc-org-item:hover {
            background: rgba(255,255,255,0.03);
        }
        
        .oc-org-item.selected {
            background: rgba(212,168,83,0.1);
            border-color: rgba(212,168,83,0.3);
        }
        
        .oc-org-item input[type="checkbox"] {
            accent-color: var(--gold-primary);
        }
        
        .oc-org-info {
            flex: 1;
            min-width: 0;
        }
        
        .oc-org-name {
            font-weight: 500;
            color: var(--text-primary);
            font-size: 0.9rem;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
        }
        
        .oc-org-meta {
            display: flex;
            gap: 0.75rem;
            font-size: 0.75rem;
            color: var(--text-muted);
        }
        
        .oc-org-badges {
            display: flex;
            gap: 0.35rem;
        }
        
        .oc-org-badge {
            padding: 0.15rem 0.4rem;
            border-radius: 4px;
            font-size: 0.65rem;
            font-weight: 500;
        }
        
        .oc-org-badge.research {
            background: rgba(34,197,94,0.15);
            color: #22c55e;
        }
        
        .oc-org-badge.email {
            background: rgba(59,130,246,0.15);
            color: #60a5fa;
        }
        
        .oc-org-badge.sent {
            background: rgba(139,92,246,0.15);
            color: #a78bfa;
        }
        
        .oc-research-status {
            display: flex;
            gap: 1rem;
            margin-bottom: 1rem;
            padding: 0.75rem;
            background: rgba(0,0,0,0.2);
            border-radius: 8px;
        }
        
        .oc-research-stat {
            display: flex;
            align-items: center;
            gap: 0.5rem;
            flex: 1;
        }
        
        .oc-research-icon {
            font-size: 1.2rem;
        }
        
        .oc-research-label {
            font-size: 0.75rem;
            color: var(--text-muted);
        }
        
        .oc-research-value {
            margin-left: auto;
            font-weight: 600;
            color: var(--text-primary);
        }
        
        .oc-action-btn {
            width: 100%;
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 0.5rem;
            padding: 0.75rem 1rem;
            border-radius: 8px;
            font-size: 0.9rem;
            font-weight: 500;
            cursor: pointer;
            transition: all 0.2s ease;
            border: 1px solid;
        }
        
        .oc-action-btn.research {
            background: rgba(59,130,246,0.15);
            border-color: rgba(59,130,246,0.3);
            color: #60a5fa;
        }
        
        .oc-action-btn.research:hover {
            background: rgba(59,130,246,0.25);
        }
        
        .oc-action-btn.primary {
            background: linear-gradient(135deg, var(--gold-primary), var(--gold-dark));
            border-color: var(--gold-primary);
            color: var(--bg-deep);
        }
        
        .oc-action-btn.primary:hover:not(:disabled) {
            transform: translateY(-1px);
            box-shadow: 0 4px 12px rgba(212,168,83,0.3);
        }
        
        .oc-action-btn:disabled {
            opacity: 0.5;
            cursor: not-allowed;
        }
        
        .oc-divider {
            border: none;
            border-top: 1px solid var(--border-subtle);
            margin: 1rem 0;
        }
        
        .oc-batch-progress {
            margin-top: 1rem;
            padding: 1rem;
            background: rgba(0,0,0,0.2);
            border-radius: 8px;
        }
        
        .oc-progress-bar {
            height: 8px;
            background: rgba(255,255,255,0.1);
            border-radius: 4px;
            overflow: hidden;
        }
        
        .oc-progress-fill {
            height: 100%;
            background: linear-gradient(90deg, var(--gold-primary), var(--gold-light));
            border-radius: 4px;
            transition: width 0.3s ease;
            width: 0%;
        }
        
        .oc-progress-text {
            display: flex;
            justify-content: space-between;
            font-size: 0.8rem;
            color: var(--text-muted);
            margin-top: 0.5rem;
        }
        
        .oc-progress-log {
            max-height: 150px;
            overflow-y: auto;
            margin-top: 0.75rem;
            font-family: 'Space Grotesk', sans-serif;
            font-size: 0.7rem;
            color: var(--text-muted);
        }
        
        .oc-progress-log-entry {
            padding: 0.25rem 0;
        }
        
        .oc-progress-log-entry.success { color: #22c55e; }
        .oc-progress-log-entry.error { color: #f87171; }
        
        /* Queue Tab */
        .oc-queue-layout {
            flex-direction: column;
            height: 100%;
            gap: 1rem;
        }
        
        .oc-queue-controls {
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 0.5rem 0;
        }
        
        .oc-queue-filters {
            display: flex;
            gap: 0.5rem;
        }
        
        .oc-queue-filter {
            padding: 0.4rem 0.75rem;
            background: rgba(255,255,255,0.05);
            border: 1px solid transparent;
            border-radius: 6px;
            color: var(--text-secondary);
            font-size: 0.8rem;
            cursor: pointer;
            transition: all 0.2s ease;
        }
        
        .oc-queue-filter:hover { background: rgba(255,255,255,0.1); }
        .oc-queue-filter.active {
            background: rgba(212,168,83,0.15);
            border-color: rgba(212,168,83,0.3);
            color: var(--gold-primary);
        }
        
        .oc-queue-actions {
            display: flex;
            gap: 0.5rem;
        }
        
        .oc-queue-action {
            display: flex;
            align-items: center;
            gap: 0.35rem;
            padding: 0.5rem 0.75rem;
            background: rgba(255,255,255,0.05);
            border: 1px solid var(--border-subtle);
            border-radius: 6px;
            color: var(--text-secondary);
            font-size: 0.8rem;
            cursor: pointer;
            transition: all 0.2s ease;
        }
        
        .oc-queue-action:hover {
            background: rgba(255,255,255,0.1);
            color: var(--text-primary);
        }
        
        .oc-queue-action.send {
            background: rgba(34,197,94,0.15);
            border-color: rgba(34,197,94,0.3);
            color: #22c55e;
        }
        
        .oc-queue-action.send:hover {
            background: rgba(34,197,94,0.25);
        }
        
        .oc-queue-review {
            flex: 1;
            display: grid;
            grid-template-columns: 350px 1fr;
            gap: 1rem;
            overflow: hidden;
        }
        
        .oc-queue-list-panel {
            background: var(--bg-card);
            border: 1px solid var(--border-subtle);
            border-radius: 12px;
            display: flex;
            flex-direction: column;
            overflow: hidden;
        }
        
        .oc-queue-list-header {
            padding: 0.75rem 1rem;
            background: rgba(0,0,0,0.2);
            border-bottom: 1px solid var(--border-subtle);
            display: flex;
            justify-content: space-between;
            font-size: 0.85rem;
            color: var(--text-muted);
        }
        
        .oc-queue-list {
            flex: 1;
            overflow-y: auto;
            padding: 0.5rem;
        }
        
        .oc-queue-item {
            display: flex;
            align-items: center;
            gap: 0.75rem;
            padding: 0.6rem 0.75rem;
            border-radius: 8px;
            cursor: pointer;
            transition: all 0.2s ease;
            border: 1px solid transparent;
            margin-bottom: 0.35rem;
        }
        
        .oc-queue-item:hover {
            background: rgba(255,255,255,0.03);
        }
        
        .oc-queue-item.active {
            background: rgba(212,168,83,0.1);
            border-color: rgba(212,168,83,0.3);
        }
        
        .oc-queue-item.approved {
            border-left: 3px solid #22c55e;
        }
        
        .oc-queue-item-icon {
            font-size: 1.2rem;
        }
        
        .oc-queue-item-info {
            flex: 1;
            min-width: 0;
        }
        
        .oc-queue-item-name {
            font-weight: 500;
            color: var(--text-primary);
            font-size: 0.85rem;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
        }
        
        .oc-queue-item-type {
            font-size: 0.7rem;
            color: var(--text-muted);
        }
        
        .oc-queue-item-status {
            padding: 0.15rem 0.4rem;
            border-radius: 4px;
            font-size: 0.65rem;
            font-weight: 500;
        }
        
        .oc-queue-item-status.pending {
            background: rgba(251,191,36,0.15);
            color: #fbbf24;
        }
        
        .oc-queue-item-status.approved {
            background: rgba(34,197,94,0.15);
            color: #22c55e;
        }
        
        .oc-queue-item-status.scheduled {
            background: rgba(59,130,246,0.15);
            color: #3b82f6;
        }
        
        .oc-queue-item-status.sent {
            background: rgba(34,197,94,0.15);
            color: #22c55e;
        }
        
        .oc-queue-item-status.failed {
            background: rgba(239,68,68,0.15);
            color: #ef4444;
        }
        
        /* Batch Workflow Wizard */
        .oc-workflow-wizard {
            display: flex;
            flex-direction: column;
            gap: 1.5rem;
            padding: 1rem;
        }
        
        .oc-workflow-steps {
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 0.5rem;
            padding: 1rem 0;
        }
        
        .oc-workflow-step {
            display: flex;
            align-items: center;
            gap: 0.5rem;
            padding: 0.5rem 1rem;
            background: rgba(255,255,255,0.03);
            border-radius: 20px;
            font-size: 0.8rem;
            color: var(--text-muted);
            transition: all 0.3s ease;
        }
        
        .oc-workflow-step.active {
            background: rgba(212,168,83,0.15);
            color: var(--gold-primary);
        }
        
        .oc-workflow-step.complete {
            background: rgba(34,197,94,0.15);
            color: #22c55e;
        }
        
        .oc-workflow-step-num {
            width: 22px;
            height: 22px;
            display: flex;
            align-items: center;
            justify-content: center;
            border-radius: 50%;
            background: rgba(255,255,255,0.1);
            font-size: 0.7rem;
            font-weight: 600;
        }
        
        .oc-workflow-step.active .oc-workflow-step-num {
            background: var(--gold-primary);
            color: #0d0d0f;
        }
        
        .oc-workflow-step.complete .oc-workflow-step-num {
            background: #22c55e;
            color: #0d0d0f;
        }
        
        .oc-workflow-connector {
            width: 30px;
            height: 2px;
            background: rgba(255,255,255,0.1);
        }
        
        /* Template Creation Panel */
        .oc-template-panel {
            background: var(--bg-card);
            border: 1px solid rgba(168,85,247,0.3);
            border-radius: 12px;
            padding: 1.25rem;
            margin-top: 1rem;
        }
        
        .oc-template-header {
            display: flex;
            align-items: center;
            gap: 0.75rem;
            margin-bottom: 1rem;
        }
        
        .oc-template-icon {
            width: 36px;
            height: 36px;
            display: flex;
            align-items: center;
            justify-content: center;
            background: rgba(168,85,247,0.15);
            border-radius: 8px;
            color: #a855f7;
        }
        
        .oc-template-title {
            font-size: 1rem;
            font-weight: 600;
            color: var(--text-primary);
        }
        
        .oc-template-subtitle {
            font-size: 0.8rem;
            color: var(--text-muted);
        }
        
        .oc-template-content {
            background: rgba(0,0,0,0.2);
            border-radius: 8px;
            padding: 1rem;
            margin-bottom: 1rem;
            max-height: 200px;
            overflow-y: auto;
            font-size: 0.85rem;
            line-height: 1.6;
            white-space: pre-wrap;
        }
        
        .oc-template-actions {
            display: flex;
            gap: 0.75rem;
        }
        
        .oc-template-btn {
            flex: 1;
            padding: 0.6rem 1rem;
            border-radius: 8px;
            font-size: 0.85rem;
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 0.5rem;
            transition: all 0.2s ease;
        }
        
        .oc-template-btn.approve {
            background: rgba(34,197,94,0.15);
            border: 1px solid rgba(34,197,94,0.3);
            color: #22c55e;
        }
        
        .oc-template-btn.approve:hover {
            background: rgba(34,197,94,0.25);
        }
        
        .oc-template-btn.edit {
            background: rgba(255,255,255,0.05);
            border: 1px solid var(--border-subtle);
            color: var(--text-secondary);
        }
        
        .oc-template-btn.edit:hover {
            background: rgba(255,255,255,0.1);
        }
        
        /* Automate Rest Panel */
        .oc-automate-panel {
            background: linear-gradient(135deg, rgba(34,197,94,0.1) 0%, rgba(34,197,94,0.05) 100%);
            border: 1px solid rgba(34,197,94,0.3);
            border-radius: 12px;
            padding: 1.25rem;
            margin-top: 1rem;
        }
        
        .oc-automate-header {
            display: flex;
            align-items: center;
            justify-content: space-between;
            margin-bottom: 1rem;
        }
        
        .oc-automate-title {
            display: flex;
            align-items: center;
            gap: 0.75rem;
        }
        
        .oc-automate-icon {
            width: 36px;
            height: 36px;
            display: flex;
            align-items: center;
            justify-content: center;
            background: rgba(34,197,94,0.15);
            border-radius: 8px;
            color: #22c55e;
        }
        
        .oc-automate-stats {
            display: flex;
            gap: 1.5rem;
            margin-bottom: 1rem;
            padding: 0.75rem;
            background: rgba(0,0,0,0.2);
            border-radius: 8px;
        }
        
        .oc-automate-stat {
            text-align: center;
        }
        
        .oc-automate-stat-value {
            font-size: 1.5rem;
            font-weight: 600;
            color: #22c55e;
        }
        
        .oc-automate-stat-label {
            font-size: 0.7rem;
            color: var(--text-muted);
            text-transform: uppercase;
        }
        
        .oc-automate-options {
            display: flex;
            flex-direction: column;
            gap: 0.75rem;
            margin-bottom: 1rem;
        }
        
        .oc-automate-option {
            display: flex;
            align-items: center;
            gap: 0.75rem;
            padding: 0.75rem;
            background: rgba(0,0,0,0.2);
            border-radius: 8px;
            cursor: pointer;
            transition: all 0.2s ease;
        }
        
        .oc-automate-option:hover {
            background: rgba(0,0,0,0.3);
        }
        
        .oc-automate-option.selected {
            background: rgba(34,197,94,0.1);
            border: 1px solid rgba(34,197,94,0.3);
        }
        
        .oc-automate-btn {
            width: 100%;
            padding: 0.75rem 1.25rem;
            background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
            border: none;
            border-radius: 8px;
            color: white;
            font-size: 0.9rem;
            font-weight: 600;
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 0.5rem;
            transition: all 0.2s ease;
        }
        
        .oc-automate-btn:hover {
            transform: translateY(-1px);
            box-shadow: 0 4px 12px rgba(34,197,94,0.3);
        }
        
        .oc-automate-btn:disabled {
            opacity: 0.5;
            cursor: not-allowed;
            transform: none;
        }
        
        /* Schedule Send Panel */
        .oc-schedule-panel {
            background: var(--bg-card);
            border: 1px solid rgba(59,130,246,0.3);
            border-radius: 12px;
            padding: 1.25rem;
        }
        
        .oc-schedule-header {
            display: flex;
            align-items: center;
            gap: 0.75rem;
            margin-bottom: 1rem;
        }
        
        .oc-schedule-icon {
            width: 36px;
            height: 36px;
            display: flex;
            align-items: center;
            justify-content: center;
            background: rgba(59,130,246,0.15);
            border-radius: 8px;
            color: #3b82f6;
        }
        
        .oc-schedule-options {
            display: grid;
            grid-template-columns: repeat(3, 1fr);
            gap: 0.5rem;
            margin-bottom: 1rem;
        }
        
        .oc-schedule-option {
            padding: 0.6rem;
            background: rgba(255,255,255,0.03);
            border: 1px solid transparent;
            border-radius: 8px;
            text-align: center;
            cursor: pointer;
            transition: all 0.2s ease;
        }
        
        .oc-schedule-option:hover {
            background: rgba(255,255,255,0.06);
        }
        
        .oc-schedule-option.selected {
            background: rgba(59,130,246,0.1);
            border-color: rgba(59,130,246,0.3);
        }
        
        .oc-schedule-option-time {
            font-size: 0.9rem;
            font-weight: 600;
            color: var(--text-primary);
        }
        
        .oc-schedule-option-label {
            font-size: 0.7rem;
            color: var(--text-muted);
        }
        
        .oc-schedule-custom {
            margin-top: 0.75rem;
        }
        
        .oc-schedule-custom input[type="datetime-local"] {
            width: 100%;
            padding: 0.6rem;
            background: rgba(0,0,0,0.2);
            border: 1px solid var(--border-subtle);
            border-radius: 8px;
            color: var(--text-primary);
            font-size: 0.85rem;
        }
        
        /* Status Dashboard */
        .oc-status-dashboard {
            display: grid;
            grid-template-columns: repeat(4, 1fr);
            gap: 1rem;
            padding: 1rem;
            background: rgba(0,0,0,0.2);
            border-radius: 12px;
            margin-bottom: 1rem;
        }
        
        .oc-status-card {
            background: var(--bg-card);
            border: 1px solid var(--border-subtle);
            border-radius: 10px;
            padding: 1rem;
            text-align: center;
        }
        
        .oc-status-card-title {
            font-size: 0.75rem;
            color: var(--text-muted);
            text-transform: uppercase;
            margin-bottom: 0.5rem;
        }
        
        .oc-status-card-value {
            font-size: 1.75rem;
            font-weight: 600;
        }
        
        .oc-status-card-value.sent { color: #22c55e; }
        .oc-status-card-value.pending { color: #fbbf24; }
        .oc-status-card-value.queued { color: #3b82f6; }
        .oc-status-card-value.draft { color: #a855f7; }
        
        .oc-status-card-sub {
            font-size: 0.7rem;
            color: var(--text-muted);
            margin-top: 0.25rem;
        }
        
        /* Quick Filters Bar */
        .oc-quick-filters {
            display: flex;
            align-items: center;
            gap: 0.5rem;
            padding: 0.75rem 1rem;
            background: rgba(0,0,0,0.2);
            border-radius: 10px;
            margin-bottom: 1rem;
            overflow-x: auto;
        }
        
        .oc-quick-filters-label {
            font-size: 0.75rem;
            color: var(--text-muted);
            white-space: nowrap;
        }
        
        .oc-quick-filter-chip {
            padding: 0.35rem 0.75rem;
            background: rgba(255,255,255,0.05);
            border: 1px solid transparent;
            border-radius: 20px;
            font-size: 0.75rem;
            color: var(--text-secondary);
            cursor: pointer;
            white-space: nowrap;
            transition: all 0.2s ease;
        }
        
        .oc-quick-filter-chip:hover {
            background: rgba(255,255,255,0.1);
        }
        
        .oc-quick-filter-chip.active {
            background: rgba(212,168,83,0.15);
            border-color: rgba(212,168,83,0.3);
            color: var(--gold-primary);
        }
        
        .oc-quick-filter-chip .count {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            min-width: 18px;
            height: 18px;
            padding: 0 0.3rem;
            background: rgba(0,0,0,0.3);
            border-radius: 10px;
            font-size: 0.65rem;
            margin-left: 0.35rem;
        }
        
        /* Progress Overlay */
        .oc-progress-overlay {
            position: fixed;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background: rgba(0,0,0,0.85);
            display: flex;
            align-items: center;
            justify-content: center;
            z-index: 10000;
        }
        
        .oc-progress-modal {
            background: var(--bg-card);
            border: 1px solid var(--border-subtle);
            border-radius: 16px;
            padding: 2rem;
            width: 90%;
            max-width: 500px;
            text-align: center;
        }
        
        .oc-progress-title {
            font-size: 1.25rem;
            font-weight: 600;
            margin-bottom: 0.5rem;
        }
        
        .oc-progress-subtitle {
            font-size: 0.9rem;
            color: var(--text-muted);
            margin-bottom: 1.5rem;
        }
        
        .oc-progress-bar-large {
            height: 12px;
            background: rgba(255,255,255,0.1);
            border-radius: 6px;
            overflow: hidden;
            margin-bottom: 1rem;
        }
        
        .oc-progress-bar-fill {
            height: 100%;
            background: linear-gradient(90deg, var(--gold-primary), var(--gold-light));
            border-radius: 6px;
            transition: width 0.3s ease;
        }
        
        .oc-progress-count {
            font-size: 0.9rem;
            color: var(--text-secondary);
            margin-bottom: 1rem;
        }
        
        .oc-progress-log-container {
            max-height: 200px;
            overflow-y: auto;
            background: rgba(0,0,0,0.2);
            border-radius: 8px;
            padding: 0.75rem;
            text-align: left;
            margin-bottom: 1rem;
        }
        
        .oc-progress-log-entry {
            font-size: 0.8rem;
            padding: 0.25rem 0;
            border-bottom: 1px solid rgba(255,255,255,0.03);
        }
        
        .oc-progress-log-entry.success { color: #22c55e; }
        .oc-progress-log-entry.error { color: #ef4444; }
        .oc-progress-log-entry.info { color: #3b82f6; }
        
        .oc-progress-cancel {
            padding: 0.6rem 1.5rem;
            background: rgba(239,68,68,0.15);
            border: 1px solid rgba(239,68,68,0.3);
            border-radius: 8px;
            color: #ef4444;
            cursor: pointer;
            font-size: 0.85rem;
        }
        
        .oc-progress-cancel:hover {
            background: rgba(239,68,68,0.25);
        }
        
        /* Proposal Designer Batch Mode */
        .pd-batch-mode-indicator {
            display: none;
            align-items: center;
            gap: 0.5rem;
            padding: 0.4rem 0.75rem;
            background: linear-gradient(135deg, rgba(168,85,247,0.2) 0%, rgba(139,92,246,0.15) 100%);
            border: 1px solid rgba(168,85,247,0.4);
            border-radius: 20px;
            font-size: 0.75rem;
            color: #c4b5fd;
            margin-left: 1rem;
        }
        
        .pd-batch-mode-indicator.active {
            display: flex;
        }
        
        .pd-batch-mode-indicator .count {
            background: rgba(168,85,247,0.3);
            padding: 0.1rem 0.4rem;
            border-radius: 10px;
            font-weight: 600;
        }
        
        .pd-batch-panel {
            position: fixed;
            top: 60px;
            right: 0;
            width: 380px;
            height: calc(100vh - 60px);
            background: var(--bg-card);
            border-left: 1px solid var(--border-subtle);
            z-index: 1001;
            display: none;
            flex-direction: column;
            transform: translateX(100%);
            transition: transform 0.3s ease;
        }
        
        .pd-batch-panel.active {
            display: flex;
            transform: translateX(0);
        }
        
        .pd-batch-header {
            padding: 1rem 1.25rem;
            border-bottom: 1px solid var(--border-subtle);
            background: rgba(0,0,0,0.2);
        }
        
        .pd-batch-header-title {
            font-size: 1rem;
            font-weight: 600;
            display: flex;
            align-items: center;
            gap: 0.5rem;
        }
        
        .pd-batch-header-sub {
            font-size: 0.8rem;
            color: var(--text-muted);
            margin-top: 0.25rem;
        }
        
        .pd-batch-tabs {
            display: flex;
            border-bottom: 1px solid var(--border-subtle);
        }
        
        .pd-batch-tab {
            flex: 1;
            padding: 0.75rem;
            background: none;
            border: none;
            color: var(--text-muted);
            font-size: 0.8rem;
            cursor: pointer;
            transition: all 0.2s ease;
            border-bottom: 2px solid transparent;
        }
        
        .pd-batch-tab:hover {
            color: var(--text-secondary);
            background: rgba(255,255,255,0.02);
        }
        
        .pd-batch-tab.active {
            color: var(--gold-primary);
            border-bottom-color: var(--gold-primary);
        }
        
        .pd-batch-content {
            flex: 1;
            overflow-y: auto;
            padding: 1rem;
        }
        
        .pd-batch-section {
            margin-bottom: 1.25rem;
        }
        
        .pd-batch-section-title {
            font-size: 0.75rem;
            text-transform: uppercase;
            color: var(--text-muted);
            letter-spacing: 0.05em;
            margin-bottom: 0.75rem;
        }
        
        .pd-batch-orgs-list {
            max-height: 250px;
            overflow-y: auto;
            border: 1px solid var(--border-subtle);
            border-radius: 8px;
        }
        
        .pd-batch-org-item {
            display: flex;
            align-items: center;
            gap: 0.75rem;
            padding: 0.6rem 0.75rem;
            border-bottom: 1px solid var(--border-subtle);
            cursor: pointer;
            transition: background 0.2s ease;
        }
        
        .pd-batch-org-item:last-child {
            border-bottom: none;
        }
        
        .pd-batch-org-item:hover {
            background: rgba(255,255,255,0.03);
        }
        
        .pd-batch-org-item.selected {
            background: rgba(168,85,247,0.1);
        }
        
        .pd-batch-org-item.current {
            background: rgba(212,168,83,0.15);
            border-left: 3px solid var(--gold-primary);
        }
        
        .pd-batch-org-item.completed {
            opacity: 0.7;
        }
        
        .pd-batch-org-item.completed .pd-batch-org-status {
            color: #22c55e;
        }
        
        .pd-batch-org-checkbox {
            width: 16px;
            height: 16px;
            accent-color: var(--gold-primary);
        }
        
        .pd-batch-org-info {
            flex: 1;
            min-width: 0;
        }
        
        .pd-batch-org-name {
            font-size: 0.85rem;
            font-weight: 500;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
        }
        
        .pd-batch-org-type {
            font-size: 0.7rem;
            color: var(--text-muted);
        }
        
        .pd-batch-org-status {
            font-size: 0.7rem;
            padding: 0.15rem 0.4rem;
            border-radius: 4px;
            background: rgba(255,255,255,0.05);
        }
        
        .pd-batch-stats {
            display: grid;
            grid-template-columns: repeat(3, 1fr);
            gap: 0.75rem;
            margin-bottom: 1rem;
        }
        
        .pd-batch-stat {
            background: rgba(0,0,0,0.2);
            border-radius: 8px;
            padding: 0.75rem;
            text-align: center;
        }
        
        .pd-batch-stat-value {
            font-size: 1.25rem;
            font-weight: 600;
        }
        
        .pd-batch-stat-value.pending { color: #fbbf24; }
        .pd-batch-stat-value.ready { color: #22c55e; }
        .pd-batch-stat-value.total { color: var(--gold-primary); }
        
        .pd-batch-stat-label {
            font-size: 0.65rem;
            color: var(--text-muted);
            text-transform: uppercase;
        }
        
        .pd-batch-workflow {
            background: rgba(168,85,247,0.1);
            border: 1px solid rgba(168,85,247,0.2);
            border-radius: 10px;
            padding: 1rem;
            margin-bottom: 1rem;
        }
        
        .pd-batch-workflow-step {
            display: flex;
            align-items: flex-start;
            gap: 0.75rem;
            padding: 0.5rem 0;
        }
        
        .pd-batch-workflow-num {
            width: 24px;
            height: 24px;
            display: flex;
            align-items: center;
            justify-content: center;
            background: rgba(168,85,247,0.2);
            border-radius: 50%;
            font-size: 0.75rem;
            font-weight: 600;
            color: #c4b5fd;
            flex-shrink: 0;
        }
        
        .pd-batch-workflow-step.active .pd-batch-workflow-num {
            background: #a855f7;
            color: white;
        }
        
        .pd-batch-workflow-step.complete .pd-batch-workflow-num {
            background: #22c55e;
            color: white;
        }
        
        .pd-batch-workflow-text {
            font-size: 0.85rem;
            color: var(--text-secondary);
        }
        
        .pd-batch-workflow-step.active .pd-batch-workflow-text {
            color: var(--text-primary);
            font-weight: 500;
        }
        
        .pd-batch-btn {
            width: 100%;
            padding: 0.75rem 1rem;
            border-radius: 8px;
            font-size: 0.85rem;
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 0.5rem;
            transition: all 0.2s ease;
            margin-bottom: 0.5rem;
        }
        
        .pd-batch-btn.primary {
            background: linear-gradient(135deg, var(--gold-primary) 0%, var(--gold-dark) 100%);
            border: none;
            color: #0d0d0f;
            font-weight: 600;
        }
        
        .pd-batch-btn.primary:hover {
            transform: translateY(-1px);
            box-shadow: 0 4px 12px rgba(212,168,83,0.3);
        }
        
        .pd-batch-btn.secondary {
            background: rgba(255,255,255,0.05);
            border: 1px solid var(--border-subtle);
            color: var(--text-secondary);
        }
        
        .pd-batch-btn.secondary:hover {
            background: rgba(255,255,255,0.1);
        }
        
        .pd-batch-btn.generate {
            background: linear-gradient(135deg, #a855f7 0%, #7c3aed 100%);
            border: none;
            color: white;
            font-weight: 600;
        }
        
        .pd-batch-btn.generate:hover {
            transform: translateY(-1px);
            box-shadow: 0 4px 12px rgba(168,85,247,0.3);
        }
        
        .pd-batch-btn:disabled {
            opacity: 0.5;
            cursor: not-allowed;
            transform: none !important;
        }
        
        /* Ready to Send Queue in Proposal Designer */
        .pd-batch-queue-item {
            display: flex;
            align-items: center;
            gap: 0.75rem;
            padding: 0.75rem;
            background: rgba(0,0,0,0.2);
            border-radius: 8px;
            margin-bottom: 0.5rem;
            cursor: pointer;
            transition: all 0.2s ease;
        }
        
        .pd-batch-queue-item:hover {
            background: rgba(0,0,0,0.3);
        }
        
        .pd-batch-queue-item.approved {
            border-left: 3px solid #22c55e;
        }
        
        .pd-batch-queue-icon {
            width: 32px;
            height: 32px;
            display: flex;
            align-items: center;
            justify-content: center;
            background: rgba(168,85,247,0.15);
            border-radius: 6px;
            font-size: 1rem;
        }
        
        .pd-batch-queue-info {
            flex: 1;
            min-width: 0;
        }
        
        .pd-batch-queue-name {
            font-size: 0.85rem;
            font-weight: 500;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
        }
        
        .pd-batch-queue-time {
            font-size: 0.7rem;
            color: var(--text-muted);
        }
        
        .pd-batch-queue-actions {
            display: flex;
            gap: 0.35rem;
        }
        
        .pd-batch-queue-action {
            width: 28px;
            height: 28px;
            display: flex;
            align-items: center;
            justify-content: center;
            background: rgba(255,255,255,0.05);
            border: 1px solid transparent;
            border-radius: 6px;
            cursor: pointer;
            transition: all 0.2s ease;
        }
        
        .pd-batch-queue-action:hover {
            background: rgba(255,255,255,0.1);
        }
        
        .pd-batch-queue-action.approve {
            color: #22c55e;
        }
        
        .pd-batch-queue-action.approve:hover {
            background: rgba(34,197,94,0.15);
            border-color: rgba(34,197,94,0.3);
        }
        
        .pd-batch-queue-empty {
            text-align: center;
            padding: 2rem 1rem;
            color: var(--text-muted);
        }
        
        .pd-batch-queue-empty-icon {
            font-size: 2rem;
            margin-bottom: 0.5rem;
            opacity: 0.5;
        }
        
        .pd-batch-footer {
            padding: 1rem;
            border-top: 1px solid var(--border-subtle);
            background: rgba(0,0,0,0.2);
        }
        
        .pd-batch-send-summary {
            display: flex;
            align-items: center;
            justify-content: space-between;
            margin-bottom: 0.75rem;
            font-size: 0.85rem;
        }
        
        .pd-batch-send-count {
            font-weight: 600;
            color: #22c55e;
        }
        
        /* Email Designer Batch Mode */
        .ed-batch-mode-indicator {
            display: none;
            align-items: center;
            gap: 0.5rem;
            padding: 0.4rem 0.75rem;
            background: linear-gradient(135deg, rgba(59,130,246,0.2) 0%, rgba(37,99,235,0.15) 100%);
            border: 1px solid rgba(59,130,246,0.4);
            border-radius: 20px;
            font-size: 0.75rem;
            color: #93c5fd;
            margin-right: 0.5rem;
        }
        
        .ed-batch-mode-indicator.active { display: flex; }
        .ed-batch-mode-indicator .count {
            background: rgba(59,130,246,0.3);
            padding: 0.1rem 0.4rem;
            border-radius: 10px;
            font-weight: 600;
        }
        
        .ed-batch-panel {
            position: fixed;
            top: 60px;
            right: 0;
            width: 380px;
            height: calc(100vh - 60px);
            background: var(--bg-card);
            border-left: 1px solid var(--border-subtle);
            z-index: 1001;
            display: none;
            flex-direction: column;
            transform: translateX(100%);
            transition: transform 0.3s ease;
        }
        
        .ed-batch-panel.active {
            display: flex;
            transform: translateX(0);
        }
        
        /* Press Release Designer Batch Mode */
        .prd-batch-mode-indicator {
            display: none;
            align-items: center;
            gap: 0.5rem;
            padding: 0.4rem 0.75rem;
            background: linear-gradient(135deg, rgba(168,85,247,0.2) 0%, rgba(139,92,246,0.15) 100%);
            border: 1px solid rgba(168,85,247,0.4);
            border-radius: 20px;
            font-size: 0.75rem;
            color: #c4b5fd;
            margin-right: 0.5rem;
        }
        
        .prd-batch-mode-indicator.active { display: flex; }
        .prd-batch-mode-indicator .count {
            background: rgba(168,85,247,0.3);
            padding: 0.1rem 0.4rem;
            border-radius: 10px;
            font-weight: 600;
        }
        
        .prd-batch-panel {
            position: fixed;
            top: 60px;
            right: 0;
            width: 380px;
            height: calc(100vh - 60px);
            background: var(--bg-card);
            border-left: 1px solid var(--border-subtle);
            z-index: 1001;
            display: none;
            flex-direction: column;
            transform: translateX(100%);
            transition: transform 0.3s ease;
        }
        
        .prd-batch-panel.active {
            display: flex;
            transform: translateX(0);
        }
        
        /* Shared batch panel styles for Email and Press Release */
        .ed-batch-panel .pd-batch-header,
        .prd-batch-panel .pd-batch-header {
            padding: 1rem 1.25rem;
            border-bottom: 1px solid var(--border-subtle);
            background: rgba(0,0,0,0.2);
        }
        
        .ed-batch-panel .pd-batch-header { border-left: 3px solid #3b82f6; }
        .prd-batch-panel .pd-batch-header { border-left: 3px solid #a855f7; }
        
        .ed-batch-panel .pd-batch-btn.generate { background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%); }
        .prd-batch-panel .pd-batch-btn.generate { background: linear-gradient(135deg, #a855f7 0%, #7c3aed 100%); }
        
        .ed-batch-panel .pd-batch-tab.active { color: #3b82f6; border-bottom-color: #3b82f6; }
        .prd-batch-panel .pd-batch-tab.active { color: #a855f7; border-bottom-color: #a855f7; }
        
        .ed-batch-panel .pd-batch-workflow { background: rgba(59,130,246,0.1); border-color: rgba(59,130,246,0.2); }
        .prd-batch-panel .pd-batch-workflow { background: rgba(168,85,247,0.1); border-color: rgba(168,85,247,0.2); }
        
        .ed-batch-panel .pd-batch-workflow-num { background: rgba(59,130,246,0.2); color: #93c5fd; }
        .prd-batch-panel .pd-batch-workflow-num { background: rgba(168,85,247,0.2); color: #c4b5fd; }
        
        .ed-batch-panel .pd-batch-workflow-step.active .pd-batch-workflow-num { background: #3b82f6; }
        .prd-batch-panel .pd-batch-workflow-step.active .pd-batch-workflow-num { background: #a855f7; }
        
        .ed-batch-panel .pd-batch-org-item.selected { background: rgba(59,130,246,0.1); }
        .prd-batch-panel .pd-batch-org-item.selected { background: rgba(168,85,247,0.1); }
        
        /* CSV Import Modal */
        .csv-import-modal {
            position: fixed;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background: rgba(0,0,0,0.85);
            z-index: 10000;
            display: none;
            justify-content: center;
            align-items: center;
            padding: 2rem;
        }
        
        .csv-import-modal.active { display: flex; }
        
        .csv-import-box {
            background: var(--bg-card);
            border-radius: 16px;
            border: 1px solid var(--border-subtle);
            width: 100%;
            max-width: 900px;
            max-height: 90vh;
            display: flex;
            flex-direction: column;
            overflow: hidden;
        }
        
        .csv-import-header {
            padding: 1.25rem 1.5rem;
            border-bottom: 1px solid var(--border-subtle);
            display: flex;
            justify-content: space-between;
            align-items: center;
            background: rgba(0,0,0,0.2);
        }
        
        .csv-import-title {
            font-size: 1.1rem;
            font-weight: 600;
            color: var(--text-primary);
            display: flex;
            align-items: center;
            gap: 0.75rem;
        }
        
        .csv-import-title svg { color: var(--gold-primary); }
        
        .csv-import-close {
            background: none;
            border: none;
            color: var(--text-muted);
            cursor: pointer;
            padding: 0.5rem;
            border-radius: 8px;
            transition: all 0.2s;
        }
        
        .csv-import-close:hover { background: rgba(255,255,255,0.1); color: var(--text-primary); }
        
        .csv-import-body {
            flex: 1;
            overflow-y: auto;
            padding: 1.5rem;
        }
        
        .csv-import-step {
            display: none;
        }
        
        .csv-import-step.active { display: block; }
        
        .csv-import-dropzone {
            border: 2px dashed rgba(212,168,83,0.3);
            border-radius: 12px;
            padding: 3rem 2rem;
            text-align: center;
            background: rgba(212,168,83,0.05);
            cursor: pointer;
            transition: all 0.2s;
        }
        
        .csv-import-dropzone:hover,
        .csv-import-dropzone.dragover {
            border-color: var(--gold-primary);
            background: rgba(212,168,83,0.1);
        }
        
        .csv-import-dropzone-icon {
            font-size: 3rem;
            margin-bottom: 1rem;
            opacity: 0.5;
        }
        
        .csv-import-dropzone-title {
            font-size: 1.1rem;
            font-weight: 500;
            color: var(--text-primary);
            margin-bottom: 0.5rem;
        }
        
        .csv-import-dropzone-sub {
            font-size: 0.85rem;
            color: var(--text-muted);
        }
        
        .csv-import-file-info {
            margin-top: 1.5rem;
            padding: 1rem;
            background: rgba(34,197,94,0.1);
            border: 1px solid rgba(34,197,94,0.3);
            border-radius: 8px;
            display: none;
        }
        
        .csv-import-file-info.active { display: flex; align-items: center; gap: 1rem; }
        
        .csv-import-file-name {
            font-weight: 500;
            color: #22c55e;
        }
        
        .csv-import-file-size {
            font-size: 0.8rem;
            color: var(--text-muted);
        }
        
        .csv-import-mapping {
            display: grid;
            grid-template-columns: repeat(2, 1fr);
            gap: 1rem;
        }
        
        .csv-import-mapping-field {
            display: flex;
            flex-direction: column;
            gap: 0.5rem;
        }
        
        .csv-import-mapping-field.required label::after {
            content: ' *';
            color: #ef4444;
        }
        
        .csv-import-mapping-field label {
            font-size: 0.8rem;
            font-weight: 500;
            color: var(--text-secondary);
        }
        
        .csv-import-mapping-field select {
            padding: 0.6rem 0.75rem;
            background: rgba(0,0,0,0.3);
            border: 1px solid var(--border-subtle);
            border-radius: 8px;
            color: var(--text-primary);
            font-size: 0.85rem;
        }
        
        .csv-import-preview {
            margin-top: 1.5rem;
        }
        
        .csv-import-preview-title {
            font-size: 0.9rem;
            font-weight: 500;
            color: var(--text-secondary);
            margin-bottom: 0.75rem;
        }
        
        .csv-import-preview-table {
            width: 100%;
            border-collapse: collapse;
            font-size: 0.8rem;
            background: rgba(0,0,0,0.2);
            border-radius: 8px;
            overflow: hidden;
        }
        
        .csv-import-preview-table th {
            background: rgba(0,0,0,0.3);
            padding: 0.6rem 0.75rem;
            text-align: left;
            font-weight: 500;
            color: var(--gold-primary);
            border-bottom: 1px solid var(--border-subtle);
        }
        
        .csv-import-preview-table td {
            padding: 0.5rem 0.75rem;
            border-bottom: 1px solid var(--border-subtle);
            color: var(--text-secondary);
            max-width: 150px;
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap;
        }
        
        .csv-import-preview-table tr:last-child td { border-bottom: none; }
        
        .csv-import-options {
            display: grid;
            grid-template-columns: repeat(2, 1fr);
            gap: 1rem;
            margin-top: 1.5rem;
            padding: 1rem;
            background: rgba(0,0,0,0.2);
            border-radius: 8px;
        }
        
        .csv-import-option {
            display: flex;
            align-items: center;
            gap: 0.75rem;
        }
        
        .csv-import-option input[type="checkbox"] {
            accent-color: var(--gold-primary);
            width: 18px;
            height: 18px;
        }
        
        .csv-import-option label {
            font-size: 0.85rem;
            color: var(--text-secondary);
            cursor: pointer;
        }
        
        .csv-import-option select {
            padding: 0.5rem;
            background: rgba(0,0,0,0.3);
            border: 1px solid var(--border-subtle);
            border-radius: 6px;
            color: var(--text-primary);
            font-size: 0.85rem;
        }
        
        .csv-import-summary {
            padding: 1.5rem;
            background: rgba(212,168,83,0.1);
            border: 1px solid rgba(212,168,83,0.3);
            border-radius: 12px;
        }
        
        .csv-import-summary-title {
            font-size: 1rem;
            font-weight: 600;
            color: var(--gold-primary);
            margin-bottom: 1rem;
        }
        
        .csv-import-summary-stats {
            display: grid;
            grid-template-columns: repeat(4, 1fr);
            gap: 1rem;
        }
        
        .csv-import-stat {
            text-align: center;
            padding: 1rem;
            background: rgba(0,0,0,0.2);
            border-radius: 8px;
        }
        
        .csv-import-stat-value {
            font-size: 1.5rem;
            font-weight: 600;
            color: var(--gold-primary);
        }
        
        .csv-import-stat-label {
            font-size: 0.75rem;
            color: var(--text-muted);
            margin-top: 0.25rem;
        }
        
        .csv-import-footer {
            padding: 1rem 1.5rem;
            border-top: 1px solid var(--border-subtle);
            display: flex;
            justify-content: space-between;
            align-items: center;
            background: rgba(0,0,0,0.2);
        }
        
        .csv-import-step-indicator {
            display: flex;
            gap: 0.5rem;
        }
        
        .csv-import-step-dot {
            width: 10px;
            height: 10px;
            border-radius: 50%;
            background: rgba(255,255,255,0.2);
        }
        
        .csv-import-step-dot.active { background: var(--gold-primary); }
        .csv-import-step-dot.complete { background: #22c55e; }
        
        .csv-import-actions {
            display: flex;
            gap: 0.75rem;
        }
        
        .csv-import-btn {
            padding: 0.6rem 1.25rem;
            border-radius: 8px;
            font-size: 0.85rem;
            font-weight: 500;
            cursor: pointer;
            transition: all 0.2s;
            display: flex;
            align-items: center;
            gap: 0.5rem;
        }
        
        .csv-import-btn.secondary {
            background: rgba(255,255,255,0.1);
            border: 1px solid var(--border-subtle);
            color: var(--text-secondary);
        }
        
        .csv-import-btn.secondary:hover { background: rgba(255,255,255,0.15); }
        
        .csv-import-btn.primary {
            background: linear-gradient(135deg, var(--gold-primary) 0%, var(--gold-secondary) 100%);
            border: none;
            color: #1a1a2e;
        }
        
        .csv-import-btn.primary:hover { filter: brightness(1.1); }
        
        .csv-import-btn:disabled {
            opacity: 0.5;
            cursor: not-allowed;
        }
        
        .csv-import-progress {
            margin-top: 1.5rem;
        }
        
        .csv-import-progress-bar {
            height: 8px;
            background: rgba(0,0,0,0.3);
            border-radius: 4px;
            overflow: hidden;
        }
        
        .csv-import-progress-fill {
            height: 100%;
            background: linear-gradient(90deg, var(--gold-primary), var(--gold-secondary));
            width: 0%;
            transition: width 0.3s ease;
        }
        
        .csv-import-progress-text {
            margin-top: 0.5rem;
            font-size: 0.8rem;
            color: var(--text-muted);
            text-align: center;
        }
        
        /* Email Discovery Queue */
        .email-discovery-panel {
            padding: 1.5rem;
        }
        
        .email-discovery-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 1.5rem;
        }
        
        .email-discovery-title {
            font-size: 1.1rem;
            font-weight: 600;
            color: var(--text-primary);
            display: flex;
            align-items: center;
            gap: 0.75rem;
        }
        
        .email-discovery-title svg { color: #f59e0b; }
        
        .email-discovery-count {
            background: rgba(245,158,11,0.2);
            color: #f59e0b;
            padding: 0.25rem 0.75rem;
            border-radius: 20px;
            font-size: 0.8rem;
            font-weight: 500;
        }
        
        .email-discovery-actions {
            display: flex;
            gap: 0.75rem;
        }
        
        .email-discovery-btn {
            padding: 0.5rem 1rem;
            border-radius: 8px;
            font-size: 0.85rem;
            font-weight: 500;
            cursor: pointer;
            display: flex;
            align-items: center;
            gap: 0.5rem;
            transition: all 0.2s;
        }
        
        .email-discovery-btn.primary {
            background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
            border: none;
            color: #1a1a2e;
        }
        
        .email-discovery-btn.secondary {
            background: rgba(255,255,255,0.1);
            border: 1px solid var(--border-subtle);
            color: var(--text-secondary);
        }
        
        .email-discovery-btn:hover { filter: brightness(1.1); }
        .email-discovery-btn:disabled { opacity: 0.5; cursor: not-allowed; }
        
        .email-discovery-list {
            display: flex;
            flex-direction: column;
            gap: 0.75rem;
            max-height: calc(100vh - 350px);
            overflow-y: auto;
        }
        
        .email-discovery-item {
            background: rgba(0,0,0,0.2);
            border: 1px solid var(--border-subtle);
            border-radius: 12px;
            padding: 1rem;
            transition: all 0.2s;
        }
        
        .email-discovery-item:hover {
            border-color: rgba(245,158,11,0.3);
            background: rgba(245,158,11,0.05);
        }
        
        .email-discovery-item.processing {
            border-color: rgba(59,130,246,0.4);
            background: rgba(59,130,246,0.05);
        }
        
        .email-discovery-item.complete {
            border-color: rgba(34,197,94,0.4);
            background: rgba(34,197,94,0.05);
        }
        
        .email-discovery-item-header {
            display: flex;
            justify-content: space-between;
            align-items: flex-start;
            margin-bottom: 0.75rem;
        }
        
        .email-discovery-contact-info {
            flex: 1;
        }
        
        .email-discovery-contact-name {
            font-weight: 500;
            color: var(--text-primary);
            margin-bottom: 0.25rem;
        }
        
        .email-discovery-contact-details {
            font-size: 0.8rem;
            color: var(--text-muted);
            display: flex;
            gap: 0.75rem;
            flex-wrap: wrap;
        }
        
        .email-discovery-contact-details span {
            display: flex;
            align-items: center;
            gap: 0.25rem;
        }
        
        .email-discovery-org-badge {
            background: rgba(168,85,247,0.15);
            color: #c4b5fd;
            padding: 0.2rem 0.5rem;
            border-radius: 6px;
            font-size: 0.7rem;
            font-weight: 500;
        }
        
        .email-discovery-guesses {
            margin-top: 0.75rem;
        }
        
        .email-discovery-guesses-label {
            font-size: 0.75rem;
            color: var(--text-muted);
            margin-bottom: 0.5rem;
            display: flex;
            align-items: center;
            gap: 0.5rem;
        }
        
        .email-discovery-guess-list {
            display: flex;
            flex-direction: column;
            gap: 0.5rem;
        }
        
        .email-discovery-guess {
            display: flex;
            align-items: center;
            gap: 0.75rem;
            padding: 0.5rem 0.75rem;
            background: rgba(0,0,0,0.2);
            border-radius: 8px;
            font-size: 0.85rem;
        }
        
        .email-discovery-guess-email {
            flex: 1;
            font-family: monospace;
            color: var(--text-primary);
        }
        
        .email-discovery-guess-confidence {
            font-size: 0.7rem;
            padding: 0.15rem 0.4rem;
            border-radius: 4px;
            font-weight: 500;
        }
        
        .email-discovery-guess-confidence.high {
            background: rgba(34,197,94,0.2);
            color: #22c55e;
        }
        
        .email-discovery-guess-confidence.medium {
            background: rgba(245,158,11,0.2);
            color: #f59e0b;
        }
        
        .email-discovery-guess-confidence.low {
            background: rgba(239,68,68,0.2);
            color: #ef4444;
        }
        
        .email-discovery-guess-actions {
            display: flex;
            gap: 0.25rem;
        }
        
        .email-discovery-guess-btn {
            background: none;
            border: none;
            padding: 0.3rem;
            cursor: pointer;
            border-radius: 4px;
            color: var(--text-muted);
            transition: all 0.2s;
        }
        
        .email-discovery-guess-btn:hover {
            background: rgba(255,255,255,0.1);
            color: var(--text-primary);
        }
        
        .email-discovery-guess-btn.accept:hover { color: #22c55e; }
        .email-discovery-guess-btn.reject:hover { color: #ef4444; }
        
        .email-discovery-generate-btn {
            margin-top: 0.5rem;
            padding: 0.4rem 0.75rem;
            background: rgba(59,130,246,0.15);
            border: 1px solid rgba(59,130,246,0.3);
            border-radius: 6px;
            color: #60a5fa;
            font-size: 0.8rem;
            cursor: pointer;
            display: flex;
            align-items: center;
            gap: 0.5rem;
            transition: all 0.2s;
        }
        
        .email-discovery-generate-btn:hover {
            background: rgba(59,130,246,0.25);
        }
        
        .email-discovery-empty {
            text-align: center;
            padding: 3rem;
            color: var(--text-muted);
        }
        
        .email-discovery-empty-icon {
            font-size: 3rem;
            margin-bottom: 1rem;
            opacity: 0.3;
        }
        
        .email-discovery-stats {
            display: grid;
            grid-template-columns: repeat(4, 1fr);
            gap: 1rem;
            margin-bottom: 1.5rem;
        }
        
        .email-discovery-stat {
            background: rgba(0,0,0,0.2);
            border-radius: 8px;
            padding: 1rem;
            text-align: center;
        }
        
        .email-discovery-stat-value {
            font-size: 1.5rem;
            font-weight: 600;
            color: var(--gold-primary);
        }
        
        .email-discovery-stat-label {
            font-size: 0.75rem;
            color: var(--text-muted);
            margin-top: 0.25rem;
        }
        
        .email-discovery-progress {
            margin-bottom: 1.5rem;
            display: none;
        }
        
        .email-discovery-progress.active { display: block; }
        
        .email-discovery-progress-bar {
            height: 8px;
            background: rgba(0,0,0,0.3);
            border-radius: 4px;
            overflow: hidden;
        }
        
        .email-discovery-progress-fill {
            height: 100%;
            background: linear-gradient(90deg, #f59e0b, #d97706);
            transition: width 0.3s ease;
        }
        
        .email-discovery-progress-text {
            margin-top: 0.5rem;
            font-size: 0.8rem;
            color: var(--text-muted);
            text-align: center;
        }
        
        /* University State Scanner */
        .uni-scanner-panel {
            padding: 1.5rem;
            height: 100%;
            overflow-y: auto;
        }
        
        .uni-scanner-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 1.5rem;
        }
        
        .uni-scanner-title {
            font-family: 'Space Grotesk', sans-serif;
            font-size: 1.2rem;
            display: flex;
            align-items: center;
            gap: 0.75rem;
        }
        
        .uni-scanner-title svg { color: #8b5cf6; }
        
        .uni-scanner-controls {
            display: flex;
            gap: 0.75rem;
        }
        
        .uni-scanner-btn {
            padding: 0.5rem 1rem;
            border-radius: 8px;
            font-size: 0.85rem;
            font-weight: 500;
            cursor: pointer;
            display: flex;
            align-items: center;
            gap: 0.5rem;
            transition: all 0.2s;
            border: none;
        }
        
        .uni-scanner-btn.primary {
            background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%);
            color: white;
        }
        
        .uni-scanner-btn.secondary {
            background: rgba(139,92,246,0.15);
            border: 1px solid rgba(139,92,246,0.3);
            color: #a78bfa;
        }
        
        .uni-scanner-btn.success {
            background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
            color: white;
        }
        
        .uni-scanner-btn:hover { filter: brightness(1.1); }
        .uni-scanner-btn:disabled { opacity: 0.5; cursor: not-allowed; }
        .uni-scanner-btn.running { animation: pulse 1.5s infinite; }
        
        @keyframes pulse {
            0%, 100% { opacity: 1; }
            50% { opacity: 0.7; }
        }
        
        .uni-scanner-overview {
            display: grid;
            grid-template-columns: repeat(4, 1fr);
            gap: 1rem;
            margin-bottom: 1.5rem;
        }
        
        .uni-scanner-stat {
            background: rgba(0,0,0,0.2);
            border-radius: 12px;
            padding: 1.25rem;
            text-align: center;
            border: 1px solid var(--border-subtle);
        }
        
        .uni-scanner-stat-value {
            font-size: 2rem;
            font-weight: 600;
            color: var(--gold-primary);
            font-family: 'Space Grotesk', sans-serif;
        }
        
        .uni-scanner-stat-label {
            font-size: 0.8rem;
            color: var(--text-muted);
            margin-top: 0.25rem;
        }
        
        .uni-scanner-current {
            background: linear-gradient(135deg, rgba(139,92,246,0.1) 0%, rgba(124,58,237,0.05) 100%);
            border: 1px solid rgba(139,92,246,0.3);
            border-radius: 12px;
            padding: 1.25rem;
            margin-bottom: 1.5rem;
            display: flex;
            align-items: center;
            gap: 1.5rem;
        }
        
        .uni-scanner-current-state {
            text-align: center;
            min-width: 120px;
        }
        
        .uni-scanner-current-code {
            font-size: 2.5rem;
            font-weight: 700;
            color: #a78bfa;
            font-family: 'Space Grotesk', sans-serif;
        }
        
        .uni-scanner-current-name {
            font-size: 0.9rem;
            color: var(--text-secondary);
        }
        
        .uni-scanner-current-progress {
            flex: 1;
        }
        
        .uni-scanner-current-bar {
            height: 12px;
            background: rgba(0,0,0,0.3);
            border-radius: 6px;
            overflow: hidden;
            margin-bottom: 0.5rem;
        }
        
        .uni-scanner-current-fill {
            height: 100%;
            background: linear-gradient(90deg, #8b5cf6, #a78bfa);
            border-radius: 6px;
            transition: width 0.5s ease;
        }
        
        .uni-scanner-current-text {
            font-size: 0.85rem;
            color: var(--text-secondary);
            display: flex;
            justify-content: space-between;
        }
        
        .uni-scanner-states-grid {
            display: grid;
            grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
            gap: 0.5rem;
            margin-bottom: 1.5rem;
        }
        
        .uni-scanner-state-chip {
            padding: 10px 6px;
            border-radius: 10px;
            text-align: center;
            font-size: 0.75rem;
            cursor: pointer;
            transition: all 0.2s ease;
            border: 1px solid rgba(255,255,255,0.06);
            background: rgba(0,0,0,0.25);
            position: relative;
            overflow: hidden;
        }

        .uni-scanner-state-chip:hover {
            border-color: rgba(212,168,83,0.4);
            background: rgba(212,168,83,0.08);
            transform: translateY(-1px);
            box-shadow: 0 2px 8px rgba(0,0,0,0.3);
        }

        .uni-scanner-state-chip.complete {
            background: rgba(34,197,94,0.1);
            border-color: rgba(34,197,94,0.25);
        }

        .uni-scanner-state-chip.complete:hover {
            background: rgba(34,197,94,0.18);
            border-color: rgba(34,197,94,0.4);
        }

        .uni-scanner-state-chip.complete .uni-scanner-state-code {
            color: #4ade80;
        }

        .uni-scanner-state-chip.complete .uni-scanner-state-count {
            color: rgba(34,197,94,0.7);
        }

        .uni-scanner-state-chip.current {
            background: rgba(212,168,83,0.12);
            border-color: rgba(212,168,83,0.4);
            box-shadow: 0 0 12px rgba(212,168,83,0.1);
        }

        .uni-scanner-state-chip.current .uni-scanner-state-code {
            color: #E8C875;
        }

        .uni-scanner-state-code {
            font-weight: 700;
            color: var(--text-primary);
            font-size: 14px;
            font-family: 'Space Grotesk', sans-serif;
            letter-spacing: 0.5px;
        }

        .uni-scanner-state-count {
            font-size: 10px;
            color: rgba(255,255,255,0.35);
            margin-top: 3px;
            font-family: 'Space Grotesk', sans-serif;
        }
        
        .uni-scanner-log {
            background: rgba(0,0,0,0.3);
            border-radius: 12px;
            padding: 1rem;
            max-height: 200px;
            overflow-y: auto;
            font-family: monospace;
            font-size: 0.8rem;
        }
        
        .uni-scanner-log-entry {
            padding: 0.25rem 0;
            border-bottom: 1px solid rgba(255,255,255,0.05);
            display: flex;
            gap: 0.75rem;
        }
        
        .uni-scanner-log-time {
            color: var(--text-muted);
            min-width: 70px;
        }
        
        .uni-scanner-log-msg { color: var(--text-secondary); }
        .uni-scanner-log-msg.success { color: #22c55e; }
        .uni-scanner-log-msg.info { color: #60a5fa; }
        .uni-scanner-log-msg.warn { color: #f59e0b; }
        
        .uni-scanner-contact-queue {
            margin-top: 1.5rem;
            background: rgba(0,0,0,0.2);
            border-radius: 12px;
            padding: 1rem;
            border: 1px solid var(--border-subtle);
        }
        
        .uni-scanner-contact-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 1rem;
        }
        
        .uni-scanner-contact-title {
            font-weight: 500;
            display: flex;
            align-items: center;
            gap: 0.5rem;
        }
        
        .uni-scanner-contact-badge {
            background: rgba(245,158,11,0.2);
            color: #f59e0b;
            padding: 0.2rem 0.5rem;
            border-radius: 10px;
            font-size: 0.75rem;
        }
        
        .oc-queue-empty {
            padding: 2rem;
            text-align: center;
            color: var(--text-muted);
        }
        
        .oc-queue-empty-hint {
            font-size: 0.8rem;
            margin-top: 0.5rem;
        }
        
        .oc-queue-preview-panel {
            background: var(--bg-card);
            border: 1px solid var(--border-subtle);
            border-radius: 12px;
            display: flex;
            flex-direction: column;
            overflow: hidden;
        }
        
        .oc-preview-header {
            padding: 0.75rem 1rem;
            background: rgba(0,0,0,0.2);
            border-bottom: 1px solid var(--border-subtle);
            display: flex;
            justify-content: space-between;
            align-items: center;
        }
        
        .oc-preview-nav {
            display: flex;
            align-items: center;
            gap: 0.75rem;
        }
        
        .oc-preview-nav button {
            padding: 0.35rem 0.6rem;
            background: rgba(255,255,255,0.05);
            border: 1px solid var(--border-subtle);
            border-radius: 4px;
            color: var(--text-muted);
            font-size: 0.75rem;
            cursor: pointer;
        }
        
        .oc-preview-nav button:hover:not(:disabled) {
            background: rgba(255,255,255,0.1);
            color: var(--text-primary);
        }
        
        .oc-preview-nav button:disabled {
            opacity: 0.5;
            cursor: not-allowed;
        }
        
        .oc-preview-content {
            flex: 1;
            overflow-y: auto;
            padding: 1.5rem;
        }
        
        .oc-preview-empty {
            display: flex;
            align-items: center;
            justify-content: center;
            height: 100%;
            color: var(--text-muted);
        }
        
        .oc-preview-actions {
            padding: 1rem;
            background: rgba(0,0,0,0.2);
            border-top: 1px solid var(--border-subtle);
            display: flex;
            gap: 0.5rem;
            justify-content: flex-end;
        }
        
        .oc-preview-btn {
            display: flex;
            align-items: center;
            gap: 0.35rem;
            padding: 0.5rem 1rem;
            border-radius: 6px;
            font-size: 0.85rem;
            cursor: pointer;
            transition: all 0.2s ease;
            border: 1px solid;
        }
        
        .oc-preview-btn.edit {
            background: rgba(255,255,255,0.05);
            border-color: var(--border-subtle);
            color: var(--text-secondary);
        }
        
        .oc-preview-btn.reject {
            background: rgba(248,113,113,0.15);
            border-color: rgba(248,113,113,0.3);
            color: #f87171;
        }
        
        .oc-preview-btn.approve {
            background: rgba(34,197,94,0.15);
            border-color: rgba(34,197,94,0.3);
            color: #22c55e;
        }
        
        .oc-preview-btn:hover {
            transform: translateY(-1px);
        }
        
        /* Drafts Tab */
        .oc-drafts-layout {
            flex-direction: column;
            height: 100%;
        }
        
        .oc-drafts-filters {
            display: flex;
            gap: 0.5rem;
            padding-bottom: 1rem;
            border-bottom: 1px solid var(--border-subtle);
        }
        
        .oc-drafts-filter {
            padding: 0.5rem 1rem;
            background: rgba(255,255,255,0.05);
            border: 1px solid transparent;
            border-radius: 6px;
            color: var(--text-secondary);
            font-size: 0.85rem;
            cursor: pointer;
            transition: all 0.2s ease;
        }
        
        .oc-drafts-filter:hover { background: rgba(255,255,255,0.1); }
        .oc-drafts-filter.active {
            background: rgba(212,168,83,0.15);
            border-color: rgba(212,168,83,0.3);
            color: var(--gold-primary);
        }
        
        .oc-drafts-list {
            flex: 1;
            overflow-y: auto;
            padding: 1rem 0;
            display: grid;
            grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
            gap: 1rem;
            align-content: start;
        }
        
        .oc-draft-card {
            background: var(--bg-card);
            border: 1px solid var(--border-subtle);
            border-radius: 12px;
            padding: 1rem;
            cursor: pointer;
            transition: all 0.2s ease;
        }
        
        .oc-draft-card:hover {
            border-color: rgba(212,168,83,0.3);
            transform: translateY(-2px);
        }
        
        .oc-draft-header {
            display: flex;
            justify-content: space-between;
            align-items: flex-start;
            margin-bottom: 0.75rem;
        }
        
        .oc-draft-type {
            font-size: 1.5rem;
        }
        
        .oc-draft-date {
            font-size: 0.7rem;
            color: var(--text-muted);
        }
        
        .oc-draft-title {
            font-weight: 500;
            color: var(--text-primary);
            margin-bottom: 0.35rem;
        }
        
        .oc-draft-org {
            font-size: 0.8rem;
            color: var(--text-muted);
        }
        
        .oc-drafts-empty {
            grid-column: 1 / -1;
            padding: 3rem;
            text-align: center;
            color: var(--text-muted);
        }
        
        .oc-drafts-hint {
            font-size: 0.8rem;
            margin-top: 0.5rem;
        }
        
        /* Sent History Tab */
        .oc-sent-layout {
            flex-direction: column;
            height: 100%;
            gap: 1rem;
        }
        
        .oc-sent-filters {
            display: flex;
            justify-content: space-between;
            align-items: center;
        }
        
        .oc-sent-date-range {
            display: flex;
            align-items: center;
            gap: 0.5rem;
        }
        
        .oc-sent-date-range input {
            padding: 0.4rem 0.6rem;
            background: var(--bg-input);
            border: 1px solid var(--border-subtle);
            border-radius: 6px;
            color: var(--text-primary);
            font-size: 0.8rem;
        }
        
        .oc-sent-date-range span {
            color: var(--text-muted);
            font-size: 0.8rem;
        }
        
        .oc-sent-type-filter {
            display: flex;
            gap: 0.5rem;
        }
        
        .oc-sent-filter {
            padding: 0.4rem 0.75rem;
            background: rgba(255,255,255,0.05);
            border: 1px solid transparent;
            border-radius: 6px;
            color: var(--text-secondary);
            font-size: 0.8rem;
            cursor: pointer;
        }
        
        .oc-sent-filter.active {
            background: rgba(212,168,83,0.15);
            border-color: rgba(212,168,83,0.3);
            color: var(--gold-primary);
        }
        
        .oc-sent-stats {
            display: flex;
            gap: 1rem;
        }
        
        .oc-sent-stat {
            flex: 1;
            background: var(--bg-card);
            border: 1px solid var(--border-subtle);
            border-radius: 8px;
            padding: 1rem;
            text-align: center;
        }
        
        .oc-sent-stat-value {
            display: block;
            font-size: 2rem;
            font-weight: 600;
            color: var(--gold-primary);
        }
        
        .oc-sent-stat-label {
            font-size: 0.75rem;
            color: var(--text-muted);
            text-transform: uppercase;
        }
        
        .oc-sent-list {
            flex: 1;
            overflow-y: auto;
        }
        
        /* Tracking Tab */
        .oc-tracking-layout {
            flex-direction: column;
            gap: 1.5rem;
            height: 100%;
        }
        
        .oc-tracking-summary {
            display: grid;
            grid-template-columns: repeat(3, 1fr);
            gap: 1rem;
        }
        
        .oc-tracking-card {
            background: var(--bg-card);
            border: 1px solid var(--border-subtle);
            border-radius: 12px;
            padding: 1rem;
        }
        
        .oc-tracking-card h4 {
            font-size: 0.9rem;
            color: var(--text-primary);
            margin-bottom: 0.75rem;
        }
        
        .oc-tracking-bar {
            height: 12px;
            background: rgba(255,255,255,0.1);
            border-radius: 6px;
            overflow: hidden;
            display: flex;
        }
        
        .oc-tracking-segment {
            height: 100%;
            transition: width 0.3s ease;
        }
        
        .oc-tracking-segment.sent { background: #22c55e; }
        .oc-tracking-segment.pending { background: rgba(251,191,36,0.5); }
        
        .oc-tracking-legend {
            display: flex;
            justify-content: space-between;
            margin-top: 0.5rem;
            font-size: 0.75rem;
            color: var(--text-muted);
        }
        
        .oc-tracking-legend .dot {
            display: inline-block;
            width: 8px;
            height: 8px;
            border-radius: 50%;
            margin-right: 0.35rem;
        }
        
        .oc-tracking-legend .dot.sent { background: #22c55e; }
        .oc-tracking-legend .dot.pending { background: rgba(251,191,36,0.5); }
        
        .oc-tracking-details {
            flex: 1;
            background: var(--bg-card);
            border: 1px solid var(--border-subtle);
            border-radius: 12px;
            overflow: hidden;
        }
        
        .oc-tracking-details h4 {
            padding: 0.75rem 1rem;
            background: rgba(0,0,0,0.2);
            border-bottom: 1px solid var(--border-subtle);
            font-size: 0.9rem;
            color: var(--text-primary);
            margin: 0;
        }
        
        .oc-tracking-list {
            max-height: 300px;
            overflow-y: auto;
            padding: 0.5rem;
        }

        /* ===== ENGAGEMENT FUNNEL ===== */
        .oc-tracking-engagement {
            margin-top: 1rem;
            padding: 1rem;
            background: var(--bg-card, rgba(15,15,25,0.6));
            border: 1px solid var(--border-subtle, rgba(255,255,255,0.08));
            border-radius: 12px;
        }
        .oc-tracking-engagement h4 {
            margin: 0 0 0.75rem 0;
            font-size: 0.9rem;
            color: var(--text-primary, #fff);
        }
        .oc-tracking-funnel {
            display: flex;
            flex-direction: column;
            gap: 0.5rem;
        }
        .oc-funnel-step {
            display: flex;
            align-items: center;
            gap: 0.75rem;
            font-size: 0.8rem;
            color: var(--text-secondary, rgba(255,255,255,0.7));
        }
        .oc-funnel-step span { white-space: nowrap; min-width: 180px; }
        .oc-funnel-bar {
            height: 24px;
            background: rgba(59,130,246,0.3);
            border-radius: 4px;
            min-width: 4px;
            transition: width 0.5s ease;
            flex-shrink: 0;
        }
        .oc-funnel-bar.opened { background: rgba(34,197,94,0.4); }
        .oc-funnel-bar.responded { background: rgba(212,168,83,0.5); }

        /* ===== UNIFIED INBOX TAB ===== */
        .oc-inbox-layout {
            display: flex;
            flex-direction: column;
            height: 100%;
            gap: 0.75rem;
            overflow: hidden;
        }
        .oc-inbox-filters {
            display: flex;
            flex-direction: column;
            gap: 0.5rem;
        }
        .oc-inbox-source-filters {
            display: flex;
            gap: 0.5rem;
            flex-wrap: wrap;
        }
        .oc-inbox-source-chip {
            display: flex;
            align-items: center;
            gap: 0.4rem;
            padding: 0.5rem 0.75rem;
            background: rgba(255,255,255,0.05);
            border: 1px solid var(--border-subtle, rgba(255,255,255,0.08));
            border-radius: 8px;
            color: var(--text-secondary, rgba(255,255,255,0.7));
            cursor: pointer;
            font-size: 0.8rem;
            transition: all 0.2s ease;
        }
        .oc-inbox-source-chip:hover {
            background: rgba(255,255,255,0.08);
            color: var(--text-primary, #fff);
        }
        .oc-inbox-source-chip.active {
            background: rgba(212,168,83,0.15);
            border-color: rgba(212,168,83,0.3);
            color: var(--gold-primary, #d4a853);
        }
        .oc-inbox-source-chip .count {
            background: rgba(255,255,255,0.1);
            padding: 0.1rem 0.4rem;
            border-radius: 10px;
            font-size: 0.7rem;
        }
        .oc-inbox-search {
            display: flex;
            gap: 0.5rem;
            align-items: center;
        }
        .oc-inbox-search input {
            flex: 1;
            padding: 0.5rem 0.75rem;
            background: rgba(0,0,0,0.2);
            border: 1px solid var(--border-subtle, rgba(255,255,255,0.08));
            border-radius: 8px;
            color: var(--text-primary, #fff);
            font-size: 0.85rem;
            outline: none;
        }
        .oc-inbox-search input:focus {
            border-color: rgba(212,168,83,0.4);
        }
        .oc-inbox-actions {
            display: flex;
            gap: 0.5rem;
        }
        .oc-inbox-action-btn {
            padding: 0.5rem 0.75rem;
            background: rgba(255,255,255,0.05);
            border: 1px solid var(--border-subtle, rgba(255,255,255,0.08));
            border-radius: 8px;
            color: var(--text-secondary, rgba(255,255,255,0.7));
            cursor: pointer;
            font-size: 0.8rem;
            display: flex;
            align-items: center;
            gap: 0.4rem;
            transition: all 0.2s ease;
            white-space: nowrap;
        }
        .oc-inbox-action-btn:hover {
            background: rgba(255,255,255,0.1);
            color: var(--text-primary, #fff);
        }
        .oc-inbox-content {
            display: grid;
            grid-template-columns: 350px 1fr;
            gap: 0.75rem;
            flex: 1;
            overflow: hidden;
        }
        .oc-inbox-list-panel {
            background: var(--bg-card, rgba(15,15,25,0.6));
            border: 1px solid var(--border-subtle, rgba(255,255,255,0.08));
            border-radius: 12px;
            display: flex;
            flex-direction: column;
            overflow: hidden;
        }
        .oc-inbox-list-header {
            padding: 0.75rem 1rem;
            background: rgba(0,0,0,0.2);
            border-bottom: 1px solid var(--border-subtle, rgba(255,255,255,0.08));
            display: flex;
            justify-content: space-between;
            align-items: center;
            font-size: 0.85rem;
            font-weight: 600;
            color: var(--text-primary, #fff);
        }
        .oc-inbox-list-count {
            color: var(--text-muted, rgba(255,255,255,0.4));
            font-weight: 400;
            font-size: 0.8rem;
        }
        .oc-inbox-list {
            flex: 1;
            overflow-y: auto;
        }
        .oc-inbox-item {
            display: flex;
            align-items: flex-start;
            gap: 0.75rem;
            padding: 0.75rem 1rem;
            border-bottom: 1px solid rgba(255,255,255,0.05);
            cursor: pointer;
            transition: background 0.2s ease;
        }
        .oc-inbox-item:hover {
            background: rgba(255,255,255,0.03);
        }
        .oc-inbox-item.active {
            background: rgba(212,168,83,0.1);
            border-left: 3px solid var(--gold-primary, #d4a853);
        }
        .oc-inbox-item.unread {
            background: rgba(59,130,246,0.05);
        }
        .oc-inbox-item.unread .oc-inbox-item-name {
            font-weight: 600;
        }
        .oc-inbox-item-source {
            font-size: 1.2rem;
            flex-shrink: 0;
            width: 28px;
            text-align: center;
        }
        .oc-inbox-item-info {
            flex: 1;
            min-width: 0;
        }
        .oc-inbox-item-name {
            font-size: 0.85rem;
            color: var(--text-primary, #fff);
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
        }
        .oc-inbox-item-subject {
            font-size: 0.8rem;
            color: var(--text-secondary, rgba(255,255,255,0.7));
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
        }
        .oc-inbox-item-preview {
            font-size: 0.75rem;
            color: var(--text-muted, rgba(255,255,255,0.4));
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
        }
        .oc-inbox-item-date {
            font-size: 0.7rem;
            color: var(--text-muted, rgba(255,255,255,0.4));
            white-space: nowrap;
            flex-shrink: 0;
        }
        .oc-inbox-preview-panel {
            background: var(--bg-card, rgba(15,15,25,0.6));
            border: 1px solid var(--border-subtle, rgba(255,255,255,0.08));
            border-radius: 12px;
            display: flex;
            flex-direction: column;
            overflow: hidden;
        }
        .oc-inbox-preview-header {
            padding: 0.75rem 1rem;
            background: rgba(0,0,0,0.2);
            border-bottom: 1px solid var(--border-subtle, rgba(255,255,255,0.08));
            display: flex;
            justify-content: space-between;
            align-items: center;
            font-size: 0.85rem;
            font-weight: 600;
            color: var(--text-primary, #fff);
        }
        .oc-inbox-preview-actions {
            display: flex;
            gap: 0.5rem;
        }
        .oc-inbox-preview-content {
            flex: 1;
            overflow-y: auto;
            padding: 1rem;
        }
        .oc-inbox-reply-area {
            border-top: 1px solid var(--border-subtle, rgba(255,255,255,0.08));
            padding: 0.75rem;
        }
        .oc-inbox-reply-textarea {
            width: 100%;
            min-height: 80px;
            padding: 0.75rem;
            background: rgba(0,0,0,0.2);
            border: 1px solid var(--border-subtle, rgba(255,255,255,0.08));
            border-radius: 8px;
            color: var(--text-primary, #fff);
            font-size: 0.85rem;
            resize: vertical;
            margin-bottom: 0.5rem;
            outline: none;
            font-family: inherit;
        }
        .oc-inbox-reply-textarea:focus {
            border-color: rgba(212,168,83,0.4);
        }
        .oc-inbox-reply-actions {
            display: flex;
            justify-content: flex-end;
            gap: 0.5rem;
        }
        .oc-inbox-empty, .oc-inbox-hint {
            text-align: center;
            color: var(--text-muted, rgba(255,255,255,0.4));
            padding: 2rem;
            font-size: 0.85rem;
        }
        .oc-inbox-hint { font-size: 0.8rem; padding: 0; }

        /* ===== CAMPAIGNS TAB ===== */
        .oc-campaigns-layout {
            display: flex;
            flex-direction: column;
            height: 100%;
            gap: 0.75rem;
            overflow: hidden;
        }
        .oc-campaigns-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
        }
        .oc-campaigns-header h3 {
            margin: 0;
            font-size: 1rem;
            color: var(--text-primary, #fff);
        }
        .oc-campaigns-subtitle {
            font-size: 0.8rem;
            color: var(--text-muted, rgba(255,255,255,0.4));
            margin: 0;
        }
        .oc-campaigns-stats {
            display: grid;
            grid-template-columns: repeat(4, 1fr);
            gap: 0.75rem;
        }
        .oc-campaigns-stat-card {
            background: var(--bg-card, rgba(15,15,25,0.6));
            border: 1px solid var(--border-subtle, rgba(255,255,255,0.08));
            border-radius: 12px;
            padding: 1rem;
            text-align: center;
        }
        .oc-campaigns-stat-value {
            font-size: 1.5rem;
            font-weight: 600;
            color: var(--gold-primary, #d4a853);
        }
        .oc-campaigns-stat-label {
            font-size: 0.75rem;
            color: var(--text-muted, rgba(255,255,255,0.4));
            text-transform: uppercase;
            letter-spacing: 0.05em;
        }
        .oc-campaigns-content {
            display: grid;
            grid-template-columns: 350px 1fr;
            gap: 0.75rem;
            flex: 1;
            overflow: hidden;
        }
        .oc-campaigns-list-panel {
            background: var(--bg-card, rgba(15,15,25,0.6));
            border: 1px solid var(--border-subtle, rgba(255,255,255,0.08));
            border-radius: 12px;
            display: flex;
            flex-direction: column;
            overflow: hidden;
        }
        .oc-campaigns-list-header {
            padding: 0.75rem 1rem;
            background: rgba(0,0,0,0.2);
            border-bottom: 1px solid var(--border-subtle, rgba(255,255,255,0.08));
            display: flex;
            justify-content: space-between;
            align-items: center;
            font-size: 0.85rem;
            font-weight: 600;
            color: var(--text-primary, #fff);
        }
        .oc-campaigns-list-header select {
            padding: 0.3rem 0.5rem;
            background: rgba(0,0,0,0.2);
            border: 1px solid var(--border-subtle, rgba(255,255,255,0.08));
            border-radius: 6px;
            color: var(--text-primary, #fff);
            font-size: 0.8rem;
            outline: none;
        }
        .oc-campaigns-list {
            flex: 1;
            overflow-y: auto;
        }
        .oc-campaigns-empty, .oc-campaigns-hint {
            text-align: center;
            color: var(--text-muted, rgba(255,255,255,0.4));
            padding: 2rem;
            font-size: 0.85rem;
        }
        .oc-campaigns-hint { font-size: 0.8rem; padding: 0; }
        .oc-campaign-item {
            padding: 0.75rem 1rem;
            border-bottom: 1px solid rgba(255,255,255,0.05);
            cursor: pointer;
            transition: background 0.2s ease;
        }
        .oc-campaign-item:hover {
            background: rgba(255,255,255,0.03);
        }
        .oc-campaign-item.active {
            background: rgba(212,168,83,0.1);
            border-left: 3px solid var(--gold-primary, #d4a853);
        }
        .oc-campaign-item-name {
            font-size: 0.9rem;
            font-weight: 600;
            color: var(--text-primary, #fff);
        }
        .oc-campaign-item-meta {
            font-size: 0.75rem;
            color: var(--text-muted, rgba(255,255,255,0.4));
            display: flex;
            gap: 0.5rem;
            margin-top: 0.25rem;
        }
        .oc-campaign-item-stats {
            display: flex;
            gap: 0.75rem;
            margin-top: 0.35rem;
            font-size: 0.75rem;
            color: var(--text-secondary, rgba(255,255,255,0.7));
        }
        .oc-campaign-status-badge {
            display: inline-block;
            padding: 0.15rem 0.5rem;
            border-radius: 10px;
            font-size: 0.7rem;
            font-weight: 600;
            text-transform: uppercase;
        }
        .oc-campaign-status-badge.active {
            background: rgba(34,197,94,0.15);
            color: #22c55e;
        }
        .oc-campaign-status-badge.paused {
            background: rgba(251,191,36,0.15);
            color: #fbbf24;
        }
        .oc-campaign-status-badge.completed {
            background: rgba(107,114,128,0.15);
            color: #6b7280;
        }
        .oc-campaigns-detail-panel {
            background: var(--bg-card, rgba(15,15,25,0.6));
            border: 1px solid var(--border-subtle, rgba(255,255,255,0.08));
            border-radius: 12px;
            overflow-y: auto;
            padding: 1rem;
        }
        .oc-campaigns-detail-empty {
            text-align: center;
            color: var(--text-muted, rgba(255,255,255,0.4));
            padding: 3rem;
        }
        .oc-campaign-detail-header {
            display: flex;
            justify-content: space-between;
            align-items: flex-start;
            margin-bottom: 1rem;
            padding-bottom: 1rem;
            border-bottom: 1px solid var(--border-subtle, rgba(255,255,255,0.08));
        }
        .oc-campaign-detail-actions {
            display: flex;
            align-items: center;
            gap: 0.5rem;
        }
        .oc-campaign-metrics {
            display: grid;
            grid-template-columns: repeat(4, 1fr);
            gap: 0.75rem;
            margin-bottom: 1rem;
        }
        .oc-campaign-metric {
            text-align: center;
            padding: 0.75rem;
            background: rgba(0,0,0,0.2);
            border-radius: 8px;
        }
        .oc-campaign-metric-value {
            font-size: 1.25rem;
            font-weight: 600;
            color: var(--gold-primary, #d4a853);
        }
        .oc-campaign-metric-label {
            font-size: 0.7rem;
            color: var(--text-muted, rgba(255,255,255,0.4));
        }
        .oc-campaign-performance-bar {
            height: 8px;
            background: rgba(255,255,255,0.1);
            border-radius: 4px;
            overflow: hidden;
            display: flex;
            margin-bottom: 1.5rem;
        }
        .oc-campaign-bar-segment {
            height: 100%;
            transition: width 0.3s ease;
        }
        .oc-campaign-timeline {
            margin-bottom: 1rem;
        }
        .oc-campaign-timeline h4 {
            font-size: 0.9rem;
            margin: 0 0 0.75rem 0;
            color: var(--text-primary, #fff);
        }
        .oc-campaign-timeline-list {
            max-height: 250px;
            overflow-y: auto;
        }
        .oc-campaign-timeline-item {
            display: flex;
            align-items: center;
            gap: 0.75rem;
            padding: 0.5rem 0;
            border-bottom: 1px solid rgba(255,255,255,0.05);
        }
        .oc-campaign-action-bar {
            display: flex;
            gap: 0.75rem;
            padding-top: 1rem;
            border-top: 1px solid var(--border-subtle, rgba(255,255,255,0.08));
        }

        /* Campaign Create Overlay */
        .oc-campaign-create-overlay {
            position: absolute;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background: rgba(0,0,0,0.6);
            z-index: 100;
            display: flex;
            align-items: center;
            justify-content: center;
        }
        .oc-campaign-create-box {
            background: var(--bg-card, rgba(15,15,25,0.95));
            border: 1px solid var(--border-subtle, rgba(255,255,255,0.08));
            border-radius: 16px;
            width: 500px;
            max-height: 80vh;
            overflow-y: auto;
        }
        .oc-campaign-create-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 1rem 1.25rem;
            border-bottom: 1px solid var(--border-subtle, rgba(255,255,255,0.08));
        }
        .oc-campaign-create-header h3 {
            margin: 0;
            font-size: 1rem;
            color: var(--text-primary, #fff);
        }
        .oc-campaign-create-body {
            padding: 1.25rem;
            display: flex;
            flex-direction: column;
            gap: 1rem;
        }
        .oc-campaign-create-body textarea {
            width: 100%;
            padding: 0.6rem;
            background: rgba(0,0,0,0.2);
            border: 1px solid var(--border-subtle, rgba(255,255,255,0.08));
            border-radius: 8px;
            color: var(--text-primary, #fff);
            font-size: 0.85rem;
            resize: vertical;
            outline: none;
            font-family: inherit;
        }
        .oc-campaign-create-body textarea:focus {
            border-color: rgba(212,168,83,0.4);
        }
        .oc-campaign-create-footer {
            display: flex;
            justify-content: flex-end;
            gap: 0.75rem;
            padding: 1rem 1.25rem;
            border-top: 1px solid var(--border-subtle, rgba(255,255,255,0.08));
        }

        /* ===== MEMBERSHIP & PARTNER HUB ===== */
        .mph-modal {
            display: none;
            position: fixed;
            top: 0;
            left: 0;
            width: 100vw;
            height: 100vh;
            background: var(--bg-deep, #0a0a1a);
            z-index: 10000;
            overflow: hidden;
        }
        .mph-modal.active {
            display: flex;
            flex-direction: column;
        }
        .mph-modal-content {
            display: flex;
            flex-direction: column;
            height: 100%;
            overflow: hidden;
        }
        .mph-header {
            display: flex;
            align-items: center;
            justify-content: space-between;
            padding: 1rem 1.5rem;
            background: var(--bg-card, rgba(15,15,25,0.6));
            border-bottom: 1px solid var(--border-subtle, rgba(255,255,255,0.08));
            flex-shrink: 0;
        }
        .mph-header h2 {
            display: flex;
            align-items: center;
            gap: 0.75rem;
            margin: 0;
            font-size: 1.2rem;
            color: var(--gold-primary, #d4af37);
        }
        .mph-header-stats {
            display: flex;
            gap: 1.5rem;
        }
        .mph-header-stat {
            text-align: center;
        }
        .mph-header-stat-value {
            font-size: 1.1rem;
            font-weight: 700;
            color: var(--text-primary, #fff);
        }
        .mph-header-stat-label {
            font-size: 0.7rem;
            color: var(--text-secondary, rgba(255,255,255,0.5));
            text-transform: uppercase;
            letter-spacing: 0.05em;
        }
        .mph-close-btn {
            background: none;
            border: 1px solid var(--border-subtle, rgba(255,255,255,0.1));
            color: var(--text-secondary, rgba(255,255,255,0.5));
            cursor: pointer;
            padding: 0.5rem;
            border-radius: 6px;
            transition: all 0.2s;
        }
        .mph-close-btn:hover {
            color: #ef4444;
            border-color: rgba(239,68,68,0.3);
            background: rgba(239,68,68,0.1);
        }

        /* Tabs */
        .mph-tab-bar {
            display: flex;
            gap: 0;
            background: var(--bg-card, rgba(15,15,25,0.6));
            border-bottom: 1px solid var(--border-subtle, rgba(255,255,255,0.08));
            flex-shrink: 0;
            padding: 0 1.5rem;
        }
        .mph-tab-btn {
            display: flex;
            align-items: center;
            gap: 0.5rem;
            padding: 0.75rem 1.25rem;
            background: none;
            border: none;
            border-bottom: 2px solid transparent;
            color: var(--text-secondary, rgba(255,255,255,0.5));
            cursor: pointer;
            font-size: 0.85rem;
            transition: all 0.2s;
        }
        .mph-tab-btn:hover {
            color: var(--text-primary, #fff);
            background: rgba(255,255,255,0.03);
        }
        .mph-tab-btn.active {
            color: var(--gold-primary, #d4af37);
            border-bottom-color: var(--gold-primary, #d4af37);
        }
        .mph-tab-content {
            display: none;
            flex: 1;
            overflow-y: auto;
            padding: 1.25rem;
        }
        .mph-tab-content.active {
            display: block;
        }

        /* Common */
        .mph-loading {
            padding: 2rem;
            text-align: center;
            color: var(--text-secondary, rgba(255,255,255,0.5));
        }
        .mph-empty {
            padding: 1rem;
            text-align: center;
            color: var(--text-muted, rgba(255,255,255,0.3));
            font-size: 0.85rem;
        }
        .mph-empty-detail {
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            height: 100%;
            gap: 1rem;
            color: var(--text-muted, rgba(255,255,255,0.3));
        }
        .mph-btn {
            padding: 0.5rem 1rem;
            border: none;
            border-radius: 6px;
            cursor: pointer;
            font-size: 0.85rem;
            transition: all 0.2s;
        }
        .mph-btn.primary {
            background: var(--gold-primary, #d4af37);
            color: #1a1a2e;
            font-weight: 600;
        }
        .mph-btn.primary:hover {
            background: #e5c04b;
        }
        .mph-btn.secondary {
            background: rgba(255,255,255,0.08);
            color: var(--text-primary, #fff);
            border: 1px solid var(--border-subtle, rgba(255,255,255,0.1));
        }
        .mph-btn.secondary:hover {
            background: rgba(255,255,255,0.12);
        }
        .mph-btn-sm {
            padding: 0.25rem 0.6rem;
            background: rgba(255,255,255,0.08);
            border: 1px solid var(--border-subtle, rgba(255,255,255,0.1));
            color: var(--text-secondary, rgba(255,255,255,0.6));
            cursor: pointer;
            border-radius: 4px;
            font-size: 0.75rem;
            transition: all 0.2s;
        }
        .mph-btn-sm:hover {
            background: rgba(255,255,255,0.15);
            color: var(--text-primary, #fff);
        }

        /* Overview */
        .mph-overview-grid {
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 1.25rem;
        }
        .mph-overview-card {
            background: var(--bg-card, rgba(15,15,25,0.6));
            border: 1px solid var(--border-subtle, rgba(255,255,255,0.08));
            border-radius: 10px;
            padding: 1.25rem;
        }
        .mph-overview-card h3 {
            margin: 0 0 1rem;
            font-size: 0.95rem;
            color: var(--gold-primary, #d4af37);
        }
        .mph-tier-breakdown, .mph-pipeline-summary {
            display: flex;
            flex-direction: column;
            gap: 0.5rem;
        }
        .mph-tier-row, .mph-pipeline-row {
            display: flex;
            align-items: center;
            gap: 0.75rem;
        }
        .mph-tier-label, .mph-pipeline-label {
            width: 80px;
            font-size: 0.8rem;
            color: var(--text-secondary, rgba(255,255,255,0.6));
            text-transform: capitalize;
        }
        .mph-tier-bar-container, .mph-pipeline-bar-container {
            flex: 1;
            height: 8px;
            background: rgba(255,255,255,0.05);
            border-radius: 4px;
            overflow: hidden;
        }
        .mph-tier-bar {
            height: 100%;
            background: var(--gold-primary, #d4af37);
            border-radius: 4px;
            transition: width 0.3s;
        }
        .mph-pipeline-bar {
            height: 100%;
            border-radius: 4px;
            transition: width 0.3s;
        }
        .mph-pipeline-bar.mph-status-prospect { background: #6b7280; }
        .mph-pipeline-bar.mph-status-proposed { background: #3b82f6; }
        .mph-pipeline-bar.mph-status-negotiating { background: #f59e0b; }
        .mph-pipeline-bar.mph-status-signed { background: #22c55e; }
        .mph-pipeline-bar.mph-status-active { background: var(--gold-primary, #d4af37); }
        .mph-tier-count, .mph-pipeline-count {
            width: 30px;
            text-align: right;
            font-size: 0.85rem;
            font-weight: 600;
            color: var(--text-primary, #fff);
        }
        .mph-overview-total {
            margin-top: 0.75rem;
            font-size: 0.8rem;
            color: var(--text-secondary, rgba(255,255,255,0.5));
            text-align: right;
        }
        .mph-revenue-grid {
            display: grid;
            grid-template-columns: repeat(4, 1fr);
            gap: 0.75rem;
            margin-bottom: 1rem;
        }
        .mph-revenue-item {
            text-align: center;
            padding: 0.5rem;
            background: rgba(255,255,255,0.03);
            border-radius: 6px;
        }
        .mph-revenue-value {
            font-size: 1rem;
            font-weight: 700;
            color: var(--text-primary, #fff);
        }
        .mph-revenue-label {
            font-size: 0.7rem;
            color: var(--text-secondary, rgba(255,255,255,0.5));
            text-transform: uppercase;
        }
        .mph-revenue-item.mph-overdue .mph-revenue-value {
            color: #ef4444;
        }
        .mph-revenue-chart {
            display: flex;
            align-items: flex-end;
            gap: 0.5rem;
            height: 80px;
            padding-top: 0.5rem;
        }
        .mph-chart-bar-wrapper {
            flex: 1;
            display: flex;
            flex-direction: column;
            align-items: center;
            height: 100%;
            justify-content: flex-end;
        }
        .mph-chart-bar {
            width: 100%;
            background: linear-gradient(to top, var(--gold-primary, #d4af37), rgba(212,175,55,0.4));
            border-radius: 3px 3px 0 0;
            min-height: 2px;
            transition: height 0.3s;
        }
        .mph-chart-label {
            font-size: 0.65rem;
            color: var(--text-muted, rgba(255,255,255,0.3));
            margin-top: 0.25rem;
        }
        .mph-activity-feed {
            max-height: 250px;
            overflow-y: auto;
        }
        .mph-activity-item {
            display: flex;
            gap: 0.75rem;
            padding: 0.5rem 0;
            border-bottom: 1px solid rgba(255,255,255,0.04);
            font-size: 0.82rem;
        }
        .mph-activity-icon {
            flex-shrink: 0;
            margin-top: 2px;
        }
        .mph-activity-time {
            font-size: 0.72rem;
            color: var(--text-muted, rgba(255,255,255,0.3));
            margin-top: 2px;
        }

        /* Members Tab */
        .mph-members-layout {
            display: flex;
            gap: 0;
            height: calc(100vh - 160px);
        }
        .mph-members-list-panel {
            width: 55%;
            display: flex;
            flex-direction: column;
            border-right: 1px solid var(--border-subtle, rgba(255,255,255,0.08));
        }
        .mph-members-detail-panel {
            flex: 1;
            overflow-y: auto;
            padding: 1rem;
        }
        .mph-members-toolbar {
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 0.75rem 1rem;
            border-bottom: 1px solid var(--border-subtle, rgba(255,255,255,0.06));
            flex-wrap: wrap;
            gap: 0.5rem;
        }
        .mph-members-filters {
            display: flex;
            gap: 0.5rem;
            flex-wrap: wrap;
        }
        .mph-members-filters select, .mph-members-filters input {
            padding: 0.4rem 0.6rem;
            background: var(--bg-deep, rgba(0,0,0,0.3));
            border: 1px solid var(--border-subtle, rgba(255,255,255,0.1));
            color: var(--text-primary, #fff);
            border-radius: 5px;
            font-size: 0.8rem;
        }
        .mph-members-actions {
            display: flex;
            gap: 0.5rem;
        }
        .mph-members-stats-bar {
            padding: 0.4rem 1rem;
            font-size: 0.78rem;
            color: var(--text-secondary, rgba(255,255,255,0.5));
            border-bottom: 1px solid var(--border-subtle, rgba(255,255,255,0.06));
        }
        .mph-members-list {
            flex: 1;
            overflow-y: auto;
        }
        .mph-member-item {
            display: flex;
            align-items: center;
            gap: 0.75rem;
            padding: 0.65rem 1rem;
            cursor: pointer;
            border-bottom: 1px solid rgba(255,255,255,0.04);
            transition: background 0.15s;
        }
        .mph-member-item:hover {
            background: rgba(255,255,255,0.04);
        }
        .mph-member-item.active {
            background: rgba(212,175,55,0.08);
            border-left: 3px solid var(--gold-primary, #d4af37);
        }
        .mph-member-avatar {
            width: 32px;
            height: 32px;
            border-radius: 50%;
            background: linear-gradient(135deg, rgba(212,175,55,0.3), rgba(212,175,55,0.1));
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 0.85rem;
            font-weight: 700;
            color: var(--gold-primary, #d4af37);
            flex-shrink: 0;
        }
        .mph-member-info {
            flex: 1;
            min-width: 0;
        }
        .mph-member-name {
            font-size: 0.85rem;
            font-weight: 500;
            color: var(--text-primary, #fff);
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
        }
        .mph-member-email {
            font-size: 0.72rem;
            color: var(--text-muted, rgba(255,255,255,0.4));
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
        }
        .mph-tier-badge {
            padding: 0.15rem 0.5rem;
            border-radius: 10px;
            font-size: 0.7rem;
            font-weight: 600;
            text-transform: uppercase;
        }
        .mph-tier-badge.mph-tier-free { background: rgba(107,114,128,0.2); color: #9ca3af; }
        .mph-tier-badge.mph-tier-founding { background: rgba(212,175,55,0.15); color: var(--gold-primary, #d4af37); }
        .mph-tier-badge.mph-tier-premium { background: rgba(168,85,247,0.15); color: #a855f7; }
        .mph-tier-badge.mph-tier-enterprise { background: rgba(59,130,246,0.15); color: #3b82f6; }
        .mph-tier-badge.mph-tier-partner { background: rgba(34,197,94,0.15); color: #22c55e; }
        .mph-member-platforms-mini {
            display: flex;
            gap: 0.25rem;
        }
        .mph-member-platforms-mini span {
            font-size: 0.65rem;
            padding: 0.1rem 0.3rem;
            background: rgba(34,197,94,0.1);
            color: #22c55e;
            border-radius: 3px;
        }
        .mph-key-status {
            font-size: 0.7rem;
            padding: 0.15rem 0.5rem;
            border-radius: 10px;
        }
        .mph-key-status.mph-key-active { background: rgba(34,197,94,0.15); color: #22c55e; }
        .mph-key-status.mph-key-sent { background: rgba(59,130,246,0.15); color: #3b82f6; }
        .mph-key-status.mph-key-pending { background: rgba(107,114,128,0.15); color: #9ca3af; }

        /* Member Detail Panel */
        .mph-member-detail {
            padding: 0.5rem;
        }
        .mph-detail-header {
            display: flex;
            align-items: center;
            gap: 1rem;
            margin-bottom: 1.25rem;
            padding-bottom: 1rem;
            border-bottom: 1px solid var(--border-subtle, rgba(255,255,255,0.08));
        }
        .mph-detail-avatar {
            width: 48px;
            height: 48px;
            border-radius: 50%;
            background: linear-gradient(135deg, rgba(212,175,55,0.3), rgba(212,175,55,0.1));
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 1.3rem;
            font-weight: 700;
            color: var(--gold-primary, #d4af37);
            flex-shrink: 0;
        }
        .mph-detail-title h3 {
            margin: 0;
            font-size: 1.1rem;
            color: var(--text-primary, #fff);
        }
        .mph-detail-email {
            font-size: 0.8rem;
            color: var(--text-secondary, rgba(255,255,255,0.5));
        }
        .mph-detail-section {
            margin-bottom: 1.25rem;
        }
        .mph-detail-section h4 {
            margin: 0 0 0.6rem;
            font-size: 0.85rem;
            color: var(--gold-primary, #d4af37);
            text-transform: uppercase;
            letter-spacing: 0.05em;
        }
        .mph-detail-row {
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 0.35rem 0;
            font-size: 0.82rem;
        }
        .mph-detail-label {
            color: var(--text-secondary, rgba(255,255,255,0.5));
        }
        .mph-detail-value {
            color: var(--text-primary, #fff);
        }
        .mph-detail-actions {
            display: flex;
            gap: 0.5rem;
            margin-top: 1.25rem;
            padding-top: 1rem;
            border-top: 1px solid var(--border-subtle, rgba(255,255,255,0.08));
        }

        /* Subscription Toggles */
        .mph-subscription-grid {
            display: flex;
            flex-direction: column;
            gap: 0.5rem;
        }
        .mph-subscription-item {
            display: flex;
            align-items: center;
            justify-content: space-between;
            padding: 0.6rem 0.75rem;
            background: rgba(255,255,255,0.03);
            border-radius: 6px;
            border: 1px solid rgba(255,255,255,0.06);
        }
        .mph-subscription-item.active {
            border-color: rgba(34,197,94,0.2);
            background: rgba(34,197,94,0.05);
        }
        .mph-sub-info {
            display: flex;
            flex-direction: column;
            gap: 0.15rem;
        }
        .mph-sub-name {
            font-size: 0.85rem;
            color: var(--text-primary, #fff);
        }
        .mph-sub-since {
            font-size: 0.7rem;
            color: var(--text-muted, rgba(255,255,255,0.4));
        }
        .mph-sub-price {
            font-size: 0.7rem;
            color: var(--text-secondary, rgba(255,255,255,0.5));
        }
        .mph-subscription-note {
            margin-top: 0.5rem;
            font-size: 0.75rem;
            color: #22c55e;
        }
        .mph-toggle {
            position: relative;
            width: 36px;
            height: 20px;
            display: inline-block;
        }
        .mph-toggle input {
            opacity: 0;
            width: 0;
            height: 0;
        }
        .mph-toggle-slider {
            position: absolute;
            cursor: pointer;
            top: 0; left: 0; right: 0; bottom: 0;
            background: rgba(255,255,255,0.1);
            border-radius: 20px;
            transition: 0.3s;
        }
        .mph-toggle-slider::before {
            content: '';
            position: absolute;
            height: 16px;
            width: 16px;
            left: 2px;
            bottom: 2px;
            background: white;
            border-radius: 50%;
            transition: 0.3s;
        }
        .mph-toggle input:checked + .mph-toggle-slider {
            background: #22c55e;
        }
        .mph-toggle input:checked + .mph-toggle-slider::before {
            transform: translateX(16px);
        }
        .mph-platform-check {
            display: flex;
            align-items: center;
            gap: 0.5rem;
            padding: 0.35rem;
            font-size: 0.82rem;
            color: var(--text-primary, #fff);
            cursor: pointer;
        }
        .mph-linked-org {
            display: flex;
            align-items: center;
            justify-content: space-between;
            padding: 0.6rem 0.75rem;
            background: rgba(255,255,255,0.03);
            border-radius: 6px;
            cursor: pointer;
            transition: background 0.2s;
        }
        .mph-linked-org:hover {
            background: rgba(255,255,255,0.06);
        }
        .mph-invoice-mini {
            display: flex;
            align-items: center;
            justify-content: space-between;
            padding: 0.4rem 0.5rem;
            border-bottom: 1px solid rgba(255,255,255,0.04);
            font-size: 0.8rem;
            cursor: pointer;
            transition: background 0.2s;
        }
        .mph-invoice-mini:hover {
            background: rgba(255,255,255,0.04);
        }
        .mph-notes-text {
            padding: 0.5rem;
            background: rgba(255,255,255,0.03);
            border-radius: 4px;
            font-size: 0.82rem;
            color: var(--text-secondary, rgba(255,255,255,0.6));
            white-space: pre-wrap;
        }

        /* Organizations Tab */
        .mph-org-layout {
            display: flex;
            gap: 0;
            height: calc(100vh - 160px);
        }
        .mph-org-list-panel {
            width: 350px;
            display: flex;
            flex-direction: column;
            border-right: 1px solid var(--border-subtle, rgba(255,255,255,0.08));
        }
        .mph-org-detail-panel {
            flex: 1;
            overflow-y: auto;
            padding: 1rem;
        }
        .mph-org-toolbar {
            display: flex;
            gap: 0.5rem;
            padding: 0.75rem;
            border-bottom: 1px solid var(--border-subtle, rgba(255,255,255,0.06));
        }
        .mph-org-toolbar input, .mph-org-toolbar select {
            flex: 1;
            padding: 0.4rem 0.6rem;
            background: var(--bg-deep, rgba(0,0,0,0.3));
            border: 1px solid var(--border-subtle, rgba(255,255,255,0.1));
            color: var(--text-primary, #fff);
            border-radius: 5px;
            font-size: 0.8rem;
        }
        .mph-org-list {
            flex: 1;
            overflow-y: auto;
        }
        .mph-org-card {
            padding: 0.75rem 1rem;
            cursor: pointer;
            border-bottom: 1px solid rgba(255,255,255,0.04);
            transition: background 0.15s;
        }
        .mph-org-card:hover {
            background: rgba(255,255,255,0.04);
        }
        .mph-org-card.active {
            background: rgba(212,175,55,0.08);
            border-left: 3px solid var(--gold-primary, #d4af37);
        }
        .mph-org-card-header {
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 0.5rem;
        }
        .mph-org-name {
            font-size: 0.85rem;
            font-weight: 500;
            color: var(--text-primary, #fff);
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
        }
        .mph-org-type-badge {
            font-size: 0.65rem;
            padding: 0.1rem 0.4rem;
            border-radius: 8px;
            text-transform: uppercase;
            font-weight: 600;
            flex-shrink: 0;
        }
        .mph-org-type-badge.mph-type-university { background: rgba(212,168,83,0.15); color: #D4A853; }
        .mph-org-type-badge.mph-type-media { background: rgba(255,107,53,0.15); color: #FF6B35; }
        .mph-org-type-badge.mph-type-government { background: rgba(34,197,94,0.15); color: #22c55e; }
        .mph-org-type-badge.mph-type-law_firm { background: rgba(245,158,11,0.15); color: #f59e0b; }
        .mph-org-type-badge.mph-type-corporate { background: rgba(59,130,246,0.15); color: #3b82f6; }
        .mph-org-type-badge.mph-type-other { background: rgba(107,114,128,0.15); color: #9ca3af; }
        .mph-org-card-meta {
            display: flex;
            gap: 0.75rem;
            margin-top: 0.3rem;
            font-size: 0.72rem;
            color: var(--text-muted, rgba(255,255,255,0.4));
        }
        .mph-partner-badge {
            font-size: 0.65rem;
            padding: 0.1rem 0.4rem;
            border-radius: 8px;
            text-transform: uppercase;
            font-weight: 600;
        }
        .mph-partner-badge.mph-status-proposed { background: rgba(59,130,246,0.15); color: #3b82f6; }
        .mph-partner-badge.mph-status-negotiating { background: rgba(245,158,11,0.15); color: #f59e0b; }
        .mph-partner-badge.mph-status-signed { background: rgba(34,197,94,0.15); color: #22c55e; }
        .mph-partner-badge.mph-status-active { background: rgba(212,175,55,0.15); color: var(--gold-primary, #d4af37); }

        /* Org Detail */
        .mph-org-detail {
            padding: 0.5rem;
        }
        .mph-contact-row {
            display: flex;
            align-items: center;
            justify-content: space-between;
            padding: 0.5rem 0.5rem;
            border-bottom: 1px solid rgba(255,255,255,0.04);
        }
        .mph-contact-info {
            display: flex;
            flex-direction: column;
            gap: 0.1rem;
        }
        .mph-contact-name {
            font-size: 0.85rem;
            color: var(--text-primary, #fff);
        }
        .mph-contact-email {
            font-size: 0.72rem;
            color: var(--text-muted, rgba(255,255,255,0.4));
        }
        .mph-contact-role {
            font-size: 0.7rem;
            color: var(--text-secondary, rgba(255,255,255,0.5));
        }
        .mph-contact-actions {
            display: flex;
            gap: 0.35rem;
        }
        .mph-domains-list {
            display: flex;
            flex-wrap: wrap;
            gap: 0.4rem;
        }
        .mph-domain-tag {
            display: inline-flex;
            align-items: center;
            gap: 0.3rem;
            padding: 0.25rem 0.6rem;
            background: rgba(168,139,250,0.1);
            border: 1px solid rgba(168,139,250,0.2);
            border-radius: 12px;
            font-size: 0.78rem;
            color: #a78bfa;
            font-family: monospace;
        }
        .mph-domain-tag button {
            background: none;
            border: none;
            color: rgba(168,139,250,0.5);
            cursor: pointer;
            font-size: 1rem;
            padding: 0;
            line-height: 1;
        }
        .mph-domain-tag button:hover {
            color: #ef4444;
        }
        .mph-domain-add {
            display: flex;
            gap: 0.5rem;
            align-items: center;
        }
        .mph-domain-add input {
            padding: 0.35rem 0.6rem;
            background: var(--bg-deep, rgba(0,0,0,0.3));
            border: 1px solid var(--border-subtle, rgba(255,255,255,0.1));
            color: var(--text-primary, #fff);
            border-radius: 5px;
            font-size: 0.8rem;
            font-family: monospace;
        }

        /* Partners Pipeline */
        .mph-pipeline {
            display: flex;
            gap: 1rem;
            height: calc(100vh - 160px);
            overflow-x: auto;
        }
        .mph-pipeline-column {
            flex: 1;
            min-width: 200px;
            display: flex;
            flex-direction: column;
            background: var(--bg-card, rgba(15,15,25,0.4));
            border-radius: 8px;
            overflow: hidden;
        }
        .mph-pipeline-column-header {
            display: flex;
            align-items: center;
            justify-content: space-between;
            padding: 0.75rem 1rem;
            background: rgba(255,255,255,0.03);
        }
        .mph-pipeline-stage-name {
            font-size: 0.85rem;
            font-weight: 600;
            color: var(--text-primary, #fff);
        }
        .mph-pipeline-count {
            font-size: 0.75rem;
            padding: 0.1rem 0.5rem;
            background: rgba(255,255,255,0.08);
            border-radius: 10px;
            color: var(--text-secondary, rgba(255,255,255,0.6));
        }
        .mph-pipeline-cards {
            flex: 1;
            overflow-y: auto;
            padding: 0.5rem;
        }
        .mph-pipeline-empty {
            text-align: center;
            padding: 1.5rem 0.5rem;
            font-size: 0.78rem;
            color: var(--text-muted, rgba(255,255,255,0.3));
        }
        .mph-partner-card {
            background: var(--bg-deep, rgba(0,0,0,0.3));
            border: 1px solid var(--border-subtle, rgba(255,255,255,0.08));
            border-radius: 8px;
            padding: 0.75rem;
            margin-bottom: 0.5rem;
            cursor: pointer;
            transition: all 0.2s;
        }
        .mph-partner-card:hover {
            border-color: rgba(212,175,55,0.3);
            transform: translateY(-1px);
        }
        .mph-partner-card-name {
            font-size: 0.85rem;
            font-weight: 500;
            color: var(--text-primary, #fff);
            margin-bottom: 0.35rem;
        }
        .mph-partner-card-meta {
            display: flex;
            gap: 0.5rem;
            align-items: center;
            font-size: 0.72rem;
            color: var(--text-muted, rgba(255,255,255,0.4));
        }
        .mph-partner-card-amount {
            font-size: 0.8rem;
            color: #22c55e;
            font-weight: 600;
            margin-top: 0.35rem;
        }
        .mph-partner-card-footer {
            display: flex;
            justify-content: space-between;
            margin-top: 0.35rem;
            font-size: 0.68rem;
            color: var(--text-muted, rgba(255,255,255,0.3));
        }

        /* Billing Tab */
        .mph-billing-stats {
            display: flex;
            gap: 1rem;
            margin-bottom: 1.25rem;
        }
        .mph-billing-stat {
            flex: 1;
            text-align: center;
            padding: 1rem;
            background: var(--bg-card, rgba(15,15,25,0.6));
            border: 1px solid var(--border-subtle, rgba(255,255,255,0.08));
            border-radius: 8px;
        }
        .mph-billing-stat.mph-overdue {
            border-color: rgba(239,68,68,0.3);
        }
        .mph-billing-stat-value {
            font-size: 1.3rem;
            font-weight: 700;
            color: var(--text-primary, #fff);
        }
        .mph-billing-stat.mph-overdue .mph-billing-stat-value {
            color: #ef4444;
        }
        .mph-billing-stat-label {
            font-size: 0.72rem;
            color: var(--text-secondary, rgba(255,255,255,0.5));
            text-transform: uppercase;
            margin-top: 0.25rem;
        }
        .mph-billing-layout {
            display: flex;
            gap: 0;
            height: calc(100vh - 260px);
            background: var(--bg-card, rgba(15,15,25,0.4));
            border: 1px solid var(--border-subtle, rgba(255,255,255,0.08));
            border-radius: 10px;
            overflow: hidden;
        }
        .mph-invoice-list-panel {
            width: 350px;
            display: flex;
            flex-direction: column;
            border-right: 1px solid var(--border-subtle, rgba(255,255,255,0.08));
            padding: 0.75rem;
        }
        .mph-invoice-detail-panel {
            flex: 1;
            overflow-y: auto;
            padding: 1rem;
        }
        .mph-invoice-toolbar {
            display: flex;
            gap: 0.5rem;
            margin-bottom: 0.75rem;
        }
        .mph-invoice-toolbar select, .mph-invoice-toolbar input {
            flex: 1;
            padding: 0.4rem 0.6rem;
            background: var(--bg-deep, rgba(0,0,0,0.3));
            border: 1px solid var(--border-subtle, rgba(255,255,255,0.1));
            color: var(--text-primary, #fff);
            border-radius: 5px;
            font-size: 0.8rem;
        }
        .mph-invoice-list {
            flex: 1;
            overflow-y: auto;
        }
        .mph-invoice-card {
            padding: 0.65rem 0.75rem;
            border: 1px solid rgba(255,255,255,0.06);
            border-radius: 6px;
            margin-bottom: 0.4rem;
            cursor: pointer;
            transition: all 0.15s;
        }
        .mph-invoice-card:hover {
            border-color: rgba(212,175,55,0.2);
            background: rgba(255,255,255,0.03);
        }
        .mph-invoice-card.active {
            border-color: rgba(212,175,55,0.4);
            background: rgba(212,175,55,0.05);
        }
        .mph-invoice-card-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
        }
        .mph-invoice-id {
            font-family: monospace;
            font-size: 0.78rem;
            color: var(--text-primary, #fff);
            font-weight: 600;
        }
        .mph-invoice-card-recipient {
            font-size: 0.78rem;
            color: var(--text-secondary, rgba(255,255,255,0.5));
            margin-top: 0.2rem;
        }
        .mph-invoice-card-footer {
            display: flex;
            justify-content: space-between;
            margin-top: 0.3rem;
        }
        .mph-invoice-amount {
            font-size: 0.85rem;
            font-weight: 600;
            color: var(--text-primary, #fff);
        }
        .mph-invoice-date {
            font-size: 0.72rem;
            color: var(--text-muted, rgba(255,255,255,0.4));
        }

        /* Status Badges */
        .mph-status-badge {
            font-size: 0.65rem;
            padding: 0.1rem 0.45rem;
            border-radius: 8px;
            text-transform: uppercase;
            font-weight: 600;
        }
        .mph-status-badge.mph-status-draft { background: rgba(107,114,128,0.2); color: #9ca3af; }
        .mph-status-badge.mph-status-sent { background: rgba(59,130,246,0.15); color: #3b82f6; }
        .mph-status-badge.mph-status-paid { background: rgba(34,197,94,0.15); color: #22c55e; }
        .mph-status-badge.mph-status-overdue { background: rgba(239,68,68,0.15); color: #ef4444; }
        .mph-status-badge.mph-status-cancelled { background: rgba(107,114,128,0.1); color: #6b7280; }

        /* Invoice Detail */
        .mph-invoice-detail {
            padding: 0.5rem;
        }
        .mph-invoice-detail-header {
            display: flex;
            align-items: center;
            justify-content: space-between;
            margin-bottom: 1.25rem;
            padding-bottom: 1rem;
            border-bottom: 1px solid var(--border-subtle, rgba(255,255,255,0.08));
        }
        .mph-invoice-detail-header h3 {
            margin: 0;
            font-size: 1.1rem;
            color: var(--text-primary, #fff);
            font-family: monospace;
        }
        .mph-invoice-detail-meta {
            display: flex;
            flex-direction: column;
            align-items: flex-end;
            gap: 0.2rem;
            font-size: 0.78rem;
            color: var(--text-secondary, rgba(255,255,255,0.5));
        }
        .mph-invoice-recipient {
            font-size: 0.95rem;
            font-weight: 500;
            color: var(--text-primary, #fff);
        }
        .mph-invoice-email {
            font-size: 0.8rem;
            color: var(--text-secondary, rgba(255,255,255,0.5));
        }
        .mph-line-items-table {
            width: 100%;
            border-collapse: collapse;
            font-size: 0.82rem;
        }
        .mph-line-items-table th {
            text-align: left;
            padding: 0.5rem 0.5rem;
            border-bottom: 1px solid var(--gold-primary, #d4af37);
            font-size: 0.75rem;
            color: var(--text-secondary, rgba(255,255,255,0.6));
            text-transform: uppercase;
        }
        .mph-line-items-table td {
            padding: 0.5rem 0.5rem;
            border-bottom: 1px solid rgba(255,255,255,0.04);
            color: var(--text-primary, #fff);
        }
        .mph-invoice-totals {
            margin-top: 0.75rem;
            padding-top: 0.5rem;
        }
        .mph-total-row {
            display: flex;
            justify-content: space-between;
            padding: 0.25rem 0.5rem;
            font-size: 0.85rem;
            color: var(--text-secondary, rgba(255,255,255,0.6));
        }
        .mph-total-row.mph-grand-total {
            font-size: 1rem;
            font-weight: 700;
            color: var(--gold-primary, #d4af37);
            border-top: 2px solid var(--gold-primary, #d4af37);
            margin-top: 0.35rem;
            padding-top: 0.5rem;
        }

        /* Invoice Create */
        .mph-invoice-create {
            padding: 0.5rem;
        }
        .mph-invoice-create h3 {
            margin: 0 0 1.25rem;
            color: var(--gold-primary, #d4af37);
        }
        .mph-line-item-row {
            display: flex;
            align-items: center;
            gap: 0.5rem;
            padding: 0.35rem 0;
        }
        .mph-line-item-row input {
            padding: 0.35rem 0.5rem;
            background: var(--bg-deep, rgba(0,0,0,0.3));
            border: 1px solid var(--border-subtle, rgba(255,255,255,0.1));
            color: var(--text-primary, #fff);
            border-radius: 4px;
            font-size: 0.8rem;
        }
        .mph-quick-add {
            display: flex;
            flex-wrap: wrap;
            gap: 0.3rem;
            align-items: center;
        }

        /* ===== INTELLIGENCE & CONTEXT SYSTEM ===== */

        /* Smart Discovery Tab */
        .pi-discovery-body {
            flex-direction: column;
            gap: 20px;
            padding: 20px;
            max-height: calc(100vh - 200px);
            overflow-y: auto;
        }

        .pi-search-panel {
            background: var(--bg-card);
            border: 1px solid var(--border-subtle);
            border-radius: 12px;
            padding: 20px;
        }

        .pi-search-textarea {
            width: 100%;
            background: rgba(0,0,0,0.3);
            border: 1px solid var(--border-subtle);
            border-radius: 8px;
            color: var(--text-primary);
            font-family: inherit;
            font-size: 13px;
            padding: 12px;
            resize: vertical;
            min-height: 80px;
            transition: border-color 0.2s;
            box-sizing: border-box;
        }

        .pi-search-textarea:focus {
            outline: none;
            border-color: var(--gold-primary);
        }

        .pi-search-textarea::placeholder {
            color: rgba(245,245,245,0.3);
        }

        .pi-search-controls {
            display: flex;
            gap: 10px;
            margin-top: 12px;
            align-items: flex-end;
        }

        .pi-control-group {
            display: flex;
            flex-direction: column;
        }

        .pi-select, .pi-input-number {
            background: rgba(0,0,0,0.3);
            border: 1px solid var(--border-subtle);
            border-radius: 6px;
            color: var(--text-primary);
            font-size: 12px;
            padding: 8px 10px;
            min-width: 120px;
        }

        .pi-input-number {
            min-width: 70px;
            width: 70px;
        }

        .pi-search-btn {
            padding: 8px 20px;
            font-size: 13px;
            display: flex;
            align-items: center;
            gap: 6px;
            white-space: nowrap;
        }

        .pi-search-presets {
            display: flex;
            align-items: center;
            gap: 6px;
            margin-top: 12px;
            flex-wrap: wrap;
        }

        .pi-preset-btn {
            background: rgba(212,168,83,0.08);
            border: 1px solid rgba(212,168,83,0.2);
            border-radius: 16px;
            color: var(--gold-primary);
            font-size: 11px;
            padding: 4px 12px;
            cursor: pointer;
            transition: all 0.2s;
        }

        .pi-preset-btn:hover {
            background: rgba(212,168,83,0.15);
            border-color: rgba(212,168,83,0.4);
        }

        /* Results Panel */
        .pi-results-panel {
            background: var(--bg-card);
            border: 1px solid var(--border-subtle);
            border-radius: 12px;
            overflow: hidden;
        }

        .pi-results-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 12px 16px;
            border-bottom: 1px solid var(--border-subtle);
            background: rgba(0,0,0,0.2);
        }

        .pi-results-list {
            max-height: 500px;
            overflow-y: auto;
        }

        .pi-result-card {
            display: flex;
            gap: 12px;
            padding: 12px 16px;
            border-bottom: 1px solid rgba(255,255,255,0.04);
            cursor: pointer;
            transition: background 0.15s;
        }

        .pi-result-card:hover {
            background: rgba(212,168,83,0.05);
        }

        .pi-result-card.selected {
            background: rgba(212,168,83,0.1);
            border-left: 3px solid var(--gold-primary);
        }

        .pi-result-checkbox {
            display: flex;
            align-items: flex-start;
            padding-top: 2px;
        }

        .pi-result-checkbox input[type="checkbox"] {
            accent-color: var(--gold-primary);
            width: 16px;
            height: 16px;
        }

        .pi-result-info {
            flex: 1;
            min-width: 0;
        }

        .pi-result-name {
            font-weight: 600;
            font-size: 13px;
            color: var(--text-primary);
            margin-bottom: 4px;
        }

        .pi-result-meta {
            display: flex;
            gap: 8px;
            align-items: center;
            font-size: 11px;
            color: var(--text-secondary);
            margin-bottom: 4px;
            flex-wrap: wrap;
        }

        .pi-result-desc {
            font-size: 11px;
            color: var(--text-secondary);
            line-height: 1.4;
            margin-top: 4px;
        }

        .pi-result-contacts {
            display: flex;
            flex-wrap: wrap;
            gap: 4px;
            margin-top: 6px;
        }

        .pi-contact-chip {
            background: rgba(59,130,246,0.1);
            border: 1px solid rgba(59,130,246,0.2);
            border-radius: 4px;
            padding: 2px 6px;
            font-size: 10px;
            color: var(--text-secondary);
        }

        /* Search Progress & Empty State */
        .pi-search-progress {
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            padding: 60px 20px;
        }

        .pi-empty-state {
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            padding: 60px 20px;
            text-align: center;
        }

        /* Dossier Overlay Panel */
        .pi-dossier-overlay {
            position: fixed;
            top: 0;
            right: 0;
            bottom: 0;
            width: 480px;
            z-index: 10001;
            display: flex;
            animation: piSlideIn 0.25s ease;
        }

        @keyframes piSlideIn {
            from { transform: translateX(100%); }
            to { transform: translateX(0); }
        }

        .pi-dossier-panel {
            width: 100%;
            background: var(--bg-card);
            border-left: 1px solid var(--border-subtle);
            display: flex;
            flex-direction: column;
            box-shadow: -8px 0 24px rgba(0,0,0,0.4);
        }

        .pi-dossier-header {
            display: flex;
            align-items: center;
            gap: 12px;
            padding: 16px 20px;
            border-bottom: 1px solid var(--border-subtle);
            background: rgba(0,0,0,0.2);
        }

        .pi-dossier-body {
            flex: 1;
            overflow-y: auto;
            padding: 16px 20px;
        }

        .pi-dossier-actions {
            display: flex;
            gap: 8px;
            padding: 12px 20px;
            border-top: 1px solid var(--border-subtle);
            background: rgba(0,0,0,0.2);
        }

        .pi-dossier-actions button {
            flex: 1;
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 6px;
        }

        /* Dossier Sections */
        .pi-dossier-section {
            border: 1px solid var(--border-subtle);
            border-radius: 8px;
            margin-bottom: 12px;
            overflow: hidden;
        }

        .pi-dossier-section-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 10px 14px;
            background: rgba(0,0,0,0.2);
            cursor: pointer;
            font-size: 13px;
            font-weight: 600;
            color: var(--text-primary);
            transition: background 0.15s;
        }

        .pi-dossier-section-header:hover {
            background: rgba(0,0,0,0.3);
        }

        .pi-section-toggle {
            font-size: 16px;
            opacity: 0.5;
            font-weight: 400;
        }

        .pi-dossier-section-body {
            padding: 12px 14px;
        }

        .pi-dossier-field {
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 4px 0;
            font-size: 12px;
        }

        .pi-field-label {
            color: var(--text-secondary);
            font-size: 11px;
            text-transform: uppercase;
            letter-spacing: 0.3px;
        }

        /* Research Items in Dossier */
        .pi-research-item {
            padding: 8px 0;
            border-bottom: 1px solid rgba(255,255,255,0.04);
        }

        .pi-research-item:last-child {
            border-bottom: none;
        }

        .pi-research-title {
            font-size: 12px;
            font-weight: 600;
            color: var(--gold-primary);
            margin-bottom: 4px;
        }

        .pi-research-content {
            font-size: 11px;
            color: var(--text-secondary);
            line-height: 1.5;
        }

        /* Comms Messages in Dossier */
        .pi-comms-message {
            padding: 8px 10px;
            border-radius: 6px;
            margin-bottom: 6px;
            font-size: 12px;
        }

        .pi-comms-message.outbound {
            background: rgba(212,168,83,0.08);
            border-left: 2px solid var(--gold-primary);
        }

        .pi-comms-message.inbound {
            background: rgba(59,130,246,0.08);
            border-left: 2px solid rgba(59,130,246,0.5);
        }

        .pi-comms-meta {
            display: flex;
            justify-content: space-between;
            font-size: 10px;
            color: var(--text-secondary);
            margin-bottom: 4px;
        }

        .pi-comms-content {
            font-size: 12px;
            color: var(--text-primary);
            line-height: 1.4;
        }

        /* Article Cards */
        .pi-article-card {
            padding: 6px 10px;
            background: rgba(0,0,0,0.2);
            border-radius: 6px;
            margin-bottom: 4px;
        }

        /* Quality Badges */
        .pi-quality-badge {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            padding: 4px 10px;
            border-radius: 12px;
            font-size: 11px;
            font-weight: 600;
            min-width: 50px;
            text-align: center;
        }

        .pi-quality-dot {
            display: inline-block;
            width: 8px;
            height: 8px;
            border-radius: 50%;
            margin-left: 6px;
            cursor: pointer;
            transition: transform 0.15s;
            vertical-align: middle;
        }

        .pi-quality-dot:hover {
            transform: scale(1.5);
        }

        /* Quality Colors */
        .pi-q-excellent {
            background: rgba(34,197,94,0.15);
            color: #22c55e;
            border: 1px solid rgba(34,197,94,0.3);
        }

        .pi-q-good {
            background: rgba(212,168,83,0.15);
            color: #d4a853;
            border: 1px solid rgba(212,168,83,0.3);
        }

        .pi-q-fair {
            background: rgba(245,158,11,0.15);
            color: #f59e0b;
            border: 1px solid rgba(245,158,11,0.3);
        }

        .pi-q-poor {
            background: rgba(239,68,68,0.15);
            color: #ef4444;
            border: 1px solid rgba(239,68,68,0.3);
        }

        /* Quality dot colors (simpler for dots) */
        .pi-quality-dot.pi-q-excellent { background: #22c55e; }
        .pi-quality-dot.pi-q-good { background: #d4a853; }
        .pi-quality-dot.pi-q-fair { background: #f59e0b; }
        .pi-quality-dot.pi-q-poor { background: #ef4444; }

        /* Dossier quality summary */
        .pi-dossier-quality-summary {
            padding: 12px 14px;
            background: rgba(0,0,0,0.2);
            border-radius: 8px;
            margin-top: 8px;
        }

        /* ===== CAMPAIGN AUTOPILOT ===== */

        /* Command Bar */
        .cap-command-bar {
            display: flex;
            align-items: center;
            gap: 0.75rem;
            padding: 0.6rem 1.25rem;
            background: rgba(0, 0, 0, 0.25);
            border-top: 1px solid var(--border-subtle);
            border-bottom: 1px solid var(--border-subtle);
        }

        .cap-command-icon {
            font-size: 1.1rem;
            opacity: 0.7;
        }

        .cap-command-input {
            flex: 1;
            background: rgba(255, 255, 255, 0.05);
            border: 1px solid var(--border-subtle);
            border-radius: 8px;
            padding: 0.55rem 1rem;
            color: var(--text-primary);
            font-size: 0.9rem;
            font-family: inherit;
            transition: border-color 0.2s, box-shadow 0.2s;
        }

        .cap-command-input:focus {
            outline: none;
            border-color: var(--gold-primary);
            box-shadow: 0 0 0 2px rgba(212, 175, 55, 0.15);
        }

        .cap-command-input::placeholder {
            color: var(--text-muted);
            font-size: 0.85rem;
        }

        .cap-voice-btn {
            width: 36px;
            height: 36px;
            border-radius: 50%;
            background: transparent;
            border: 1px solid var(--border-subtle);
            color: var(--text-muted);
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            transition: all 0.2s;
        }

        .cap-voice-btn:hover {
            border-color: var(--gold-primary);
            color: var(--gold-primary);
            background: rgba(212, 175, 55, 0.1);
        }

        .cap-voice-btn.recording {
            background: rgba(239, 68, 68, 0.2);
            border-color: #ef4444;
            color: #ef4444;
            animation: capVoicePulse 1.5s ease-in-out infinite;
        }

        @keyframes capVoicePulse {
            0%, 100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.4); }
            50% { box-shadow: 0 0 0 8px rgba(239, 68, 68, 0); }
        }

        .cap-voice-status {
            font-size: 0.75rem;
            color: var(--text-muted);
            font-style: italic;
            min-width: 0;
            max-width: 120px;
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap;
        }

        .cap-submit-btn {
            padding: 0.55rem 1.25rem;
            background: var(--gold-primary);
            color: #1a1a2e;
            border: none;
            border-radius: 8px;
            font-size: 0.85rem;
            font-weight: 600;
            cursor: pointer;
            transition: all 0.2s;
            font-family: inherit;
        }

        .cap-submit-btn:hover {
            filter: brightness(1.1);
            transform: translateY(-1px);
        }

        .cap-submit-btn:disabled {
            opacity: 0.5;
            cursor: not-allowed;
            transform: none;
        }

        /* Autopilot Execution Panel */
        .cap-panel {
            position: absolute;
            top: 0;
            right: -500px;
            width: 500px;
            height: 100%;
            background: var(--bg-primary);
            border-left: 1px solid var(--border-subtle);
            display: flex;
            flex-direction: column;
            z-index: 1001;
            transition: right 0.3s cubic-bezier(0.4, 0, 0.2, 1);
            box-shadow: -4px 0 20px rgba(0, 0, 0, 0.3);
        }

        .cap-panel.active {
            right: 0;
        }

        .cap-panel-header {
            display: flex;
            align-items: center;
            justify-content: space-between;
            padding: 1rem 1.25rem;
            border-bottom: 1px solid var(--border-subtle);
            background: rgba(0, 0, 0, 0.15);
        }

        .cap-panel-title {
            display: flex;
            align-items: center;
            gap: 0.5rem;
        }

        .cap-panel-title h3 {
            margin: 0;
            font-size: 1rem;
            font-weight: 600;
            color: var(--text-primary);
        }

        .cap-panel-title svg {
            color: var(--gold-primary);
        }

        .cap-panel-header-right {
            display: flex;
            align-items: center;
            gap: 0.75rem;
        }

        .cap-panel-status {
            font-size: 0.75rem;
            padding: 0.2rem 0.6rem;
            border-radius: 12px;
            background: rgba(255, 255, 255, 0.08);
            color: var(--text-muted);
            font-weight: 500;
        }

        .cap-panel-status.active {
            background: rgba(212, 175, 55, 0.15);
            color: var(--gold-primary);
        }

        .cap-panel-status.complete {
            background: rgba(34, 197, 94, 0.15);
            color: #22c55e;
        }

        .cap-panel-close {
            background: transparent;
            border: none;
            color: var(--text-muted);
            font-size: 1.5rem;
            cursor: pointer;
            padding: 0;
            line-height: 1;
            transition: color 0.2s;
        }

        .cap-panel-close:hover {
            color: var(--text-primary);
        }

        .cap-panel-command {
            padding: 0.75rem 1.25rem;
            border-bottom: 1px solid var(--border-subtle);
            font-style: italic;
            color: var(--text-muted);
            font-size: 0.85rem;
            background: rgba(0, 0, 0, 0.1);
        }

        .cap-panel-command::before {
            content: '"';
            color: var(--gold-primary);
        }

        .cap-panel-command::after {
            content: '"';
            color: var(--gold-primary);
        }

        .cap-panel-steps {
            flex: 1;
            overflow-y: auto;
            padding: 1rem 1.25rem;
            display: flex;
            flex-direction: column;
            gap: 0.75rem;
        }

        /* Empty State */
        .cap-empty-state {
            text-align: center;
            padding: 2rem 1rem;
            color: var(--text-muted);
        }

        .cap-empty-icon {
            font-size: 2.5rem;
            margin-bottom: 0.75rem;
            opacity: 0.5;
        }

        .cap-empty-state p {
            font-size: 0.9rem;
            margin-bottom: 1.5rem;
        }

        .cap-empty-examples {
            display: flex;
            flex-direction: column;
            gap: 0.5rem;
        }

        .cap-example {
            padding: 0.6rem 1rem;
            background: rgba(255, 255, 255, 0.03);
            border: 1px solid var(--border-subtle);
            border-radius: 8px;
            font-size: 0.8rem;
            font-style: italic;
            cursor: pointer;
            transition: all 0.2s;
            color: var(--text-secondary);
        }

        .cap-example:hover {
            border-color: var(--gold-primary);
            background: rgba(212, 175, 55, 0.05);
            color: var(--gold-primary);
        }

        /* Step Cards */
        .cap-step {
            background: var(--bg-card);
            border: 1px solid var(--border-subtle);
            border-left: 3px solid var(--border-subtle);
            border-radius: 8px;
            padding: 1rem;
            transition: all 0.3s;
        }

        .cap-step.pending {
            border-left-color: rgba(255, 255, 255, 0.15);
            opacity: 0.6;
        }

        .cap-step.awaiting {
            border-left-color: var(--gold-primary);
            opacity: 1;
            box-shadow: 0 0 12px rgba(212, 175, 55, 0.1);
            animation: capStepPulse 2s ease-in-out infinite;
        }

        @keyframes capStepPulse {
            0%, 100% { box-shadow: 0 0 12px rgba(212, 175, 55, 0.1); }
            50% { box-shadow: 0 0 20px rgba(212, 175, 55, 0.2); }
        }

        .cap-step.executing {
            border-left-color: #3b82f6;
            opacity: 1;
        }

        .cap-step.completed {
            border-left-color: #22c55e;
            opacity: 0.8;
        }

        .cap-step.failed {
            border-left-color: #ef4444;
            opacity: 1;
        }

        .cap-step.skipped {
            border-left-color: rgba(255, 255, 255, 0.1);
            opacity: 0.4;
        }

        .cap-step-header {
            display: flex;
            align-items: center;
            gap: 0.75rem;
            margin-bottom: 0.4rem;
        }

        .cap-step-number {
            width: 24px;
            height: 24px;
            border-radius: 50%;
            background: rgba(255, 255, 255, 0.08);
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 0.7rem;
            font-weight: 700;
            color: var(--text-muted);
            flex-shrink: 0;
        }

        .cap-step.awaiting .cap-step-number {
            background: rgba(212, 175, 55, 0.2);
            color: var(--gold-primary);
        }

        .cap-step.executing .cap-step-number {
            background: rgba(59, 130, 246, 0.2);
            color: #3b82f6;
        }

        .cap-step.completed .cap-step-number {
            background: rgba(34, 197, 94, 0.2);
            color: #22c55e;
        }

        .cap-step.failed .cap-step-number {
            background: rgba(239, 68, 68, 0.2);
            color: #ef4444;
        }

        .cap-step-title {
            font-size: 0.9rem;
            font-weight: 600;
            color: var(--text-primary);
            flex: 1;
        }

        .cap-step-status-icon {
            font-size: 0.85rem;
        }

        .cap-step-desc {
            font-size: 0.8rem;
            color: var(--text-muted);
            margin-left: 2.5rem;
            margin-bottom: 0.5rem;
            line-height: 1.4;
        }

        .cap-step-result {
            font-size: 0.8rem;
            color: #22c55e;
            margin-left: 2.5rem;
            margin-top: 0.4rem;
            padding: 0.4rem 0.6rem;
            background: rgba(34, 197, 94, 0.08);
            border-radius: 6px;
            display: inline-block;
        }

        .cap-step-error {
            font-size: 0.8rem;
            color: #ef4444;
            margin-left: 2.5rem;
            margin-top: 0.4rem;
            padding: 0.4rem 0.6rem;
            background: rgba(239, 68, 68, 0.08);
            border-radius: 6px;
        }

        .cap-step-actions {
            display: flex;
            gap: 0.5rem;
            margin-left: 2.5rem;
            margin-top: 0.75rem;
        }

        .cap-step-spinner {
            display: inline-block;
            width: 14px;
            height: 14px;
            border: 2px solid rgba(59, 130, 246, 0.3);
            border-top-color: #3b82f6;
            border-radius: 50%;
            animation: capSpin 0.8s linear infinite;
        }

        @keyframes capSpin {
            to { transform: rotate(360deg); }
        }

        /* Step Action Buttons */
        .cap-btn {
            padding: 0.4rem 0.85rem;
            border-radius: 6px;
            font-size: 0.8rem;
            font-weight: 500;
            cursor: pointer;
            border: 1px solid transparent;
            transition: all 0.2s;
            display: inline-flex;
            align-items: center;
            gap: 0.4rem;
            font-family: inherit;
        }

        .cap-btn-approve {
            background: var(--gold-primary);
            color: #1a1a2e;
            border-color: var(--gold-primary);
        }

        .cap-btn-approve:hover {
            filter: brightness(1.1);
            transform: translateY(-1px);
        }

        .cap-btn-skip {
            background: transparent;
            color: var(--text-muted);
            border-color: var(--border-subtle);
        }

        .cap-btn-skip:hover {
            border-color: var(--text-secondary);
            color: var(--text-secondary);
        }

        .cap-btn-cancel {
            background: rgba(239, 68, 68, 0.1);
            color: #ef4444;
            border-color: rgba(239, 68, 68, 0.3);
        }

        .cap-btn-cancel:hover {
            background: rgba(239, 68, 68, 0.2);
        }

        .cap-btn-retry {
            background: rgba(251, 146, 60, 0.1);
            color: #fb923c;
            border-color: rgba(251, 146, 60, 0.3);
        }

        .cap-btn-retry:hover {
            background: rgba(251, 146, 60, 0.2);
        }

        /* Panel Actions Footer */
        .cap-panel-actions {
            padding: 0.75rem 1.25rem;
            border-top: 1px solid var(--border-subtle);
            display: flex;
            justify-content: flex-end;
            gap: 0.5rem;
            background: rgba(0, 0, 0, 0.1);
        }

        /* Analyzing Spinner State */
        .cap-analyzing {
            text-align: center;
            padding: 3rem 1rem;
        }

        .cap-analyzing-spinner {
            width: 40px;
            height: 40px;
            border: 3px solid rgba(212, 175, 55, 0.2);
            border-top-color: var(--gold-primary);
            border-radius: 50%;
            animation: capSpin 1s linear infinite;
            margin: 0 auto 1rem;
        }

        .cap-analyzing-text {
            color: var(--text-muted);
            font-size: 0.9rem;
        }

        /* Completion State */
        .cap-workflow-complete {
            text-align: center;
            padding: 1.5rem;
            background: rgba(34, 197, 94, 0.05);
            border: 1px solid rgba(34, 197, 94, 0.15);
            border-radius: 8px;
            margin-top: 0.75rem;
        }

        .cap-workflow-complete-icon {
            font-size: 2rem;
            margin-bottom: 0.5rem;
        }

        .cap-workflow-complete-text {
            font-size: 0.9rem;
            color: #22c55e;
            font-weight: 500;
        }

        .cap-workflow-complete-summary {
            font-size: 0.8rem;
            color: var(--text-muted);
            margin-top: 0.4rem;
        }

        /* ===== PROPOSAL DESIGNER ===== */
        .proposal-designer-fullscreen {
            position: fixed;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background: linear-gradient(145deg, #0a0a0f 0%, #0f0f18 50%, #0a0a12 100%);
            z-index: 10000;
            display: none;
            flex-direction: column;
        }
        .proposal-designer-fullscreen.active { display: flex; }
        
        /* Header */
        .pd-header {
            background: linear-gradient(180deg, rgba(15,15,25,0.98) 0%, rgba(10,10,15,0.95) 100%);
            border-bottom: 1px solid rgba(212,168,83,0.15);
            padding: 0;
            display: flex;
            justify-content: space-between;
            align-items: stretch;
            height: 60px;
            box-shadow: 0 2px 20px rgba(0,0,0,0.3);
        }
        .pd-header-left {
            display: flex;
            align-items: center;
            gap: 0;
        }
        .pd-header-logo {
            display: flex;
            align-items: center;
            gap: 0.6rem;
            padding: 0 1.25rem;
            border-right: 1px solid rgba(255,255,255,0.06);
            height: 100%;
            background: rgba(0,0,0,0.2);
        }
        .pd-header-logo-icon {
            width: 36px;
            height: 36px;
            display: flex;
            align-items: center;
            justify-content: center;
        }
        .pd-header-logo-icon img {
            width: 100%;
            height: 100%;
            object-fit: contain;
            filter: drop-shadow(0 2px 6px rgba(212,168,83,0.4));
        }
        .pd-header-logo span {
            font-size: 0.65rem;
            letter-spacing: 0.15em;
            color: var(--text-muted);
            text-transform: uppercase;
        }
        .pd-header-divider { display: none; }
        .pd-header-org {
            font-size: 0.9rem;
            font-weight: 500;
            display: none;
        }
        .pd-header-org-sub {
            font-size: 0.75rem;
            color: var(--text-muted);
            display: none;
        }
        .pd-header-center {
            flex: 1;
            display: flex;
            align-items: center;
            padding: 0 1.5rem;
        }
        .pd-org-selector {
            background: rgba(255,255,255,0.03);
            border: 1px solid rgba(255,255,255,0.08);
            border-radius: 10px;
            padding: 0.5rem 1rem;
            color: var(--text-primary);
            font-family: 'Inter', sans-serif;
            font-size: 1rem;
            cursor: pointer;
            transition: all 0.2s ease;
            min-width: 300px;
            appearance: none;
            background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23888' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
            background-repeat: no-repeat;
            background-position: right 1rem center;
            padding-right: 2.5rem;
        }
        .pd-org-selector:hover { border-color: rgba(212,168,83,0.4); }
        .pd-org-selector:focus { outline: none; border-color: var(--gold-primary); box-shadow: 0 0 0 3px rgba(212,168,83,0.1); }
        .pd-header-actions {
            display: flex;
            gap: 0.6rem;
            padding: 0 1.25rem;
            align-items: center;
        }

        /* Campaign context banner (shown when designer opened from orchestrator) */
        .pd-campaign-banner {
            background: linear-gradient(135deg, rgba(96,165,250,0.08) 0%, rgba(139,92,246,0.08) 100%);
            border-bottom: 1px solid rgba(96,165,250,0.2);
            padding: 0.5rem 1.25rem;
            display: flex;
            align-items: center;
        }
        .pd-campaign-banner-content {
            display: flex;
            align-items: center;
            gap: 1rem;
            width: 100%;
        }
        .pd-campaign-banner-icon {
            color: #60a5fa;
            flex-shrink: 0;
        }
        .pd-campaign-banner-text {
            display: flex;
            align-items: center;
            gap: 1rem;
            flex: 1;
            overflow: hidden;
        }
        .pd-campaign-banner-label {
            font-size: 0.65rem;
            text-transform: uppercase;
            letter-spacing: 0.1em;
            color: #60a5fa;
            font-weight: 600;
            flex-shrink: 0;
        }
        .pd-campaign-banner-query,
        .pd-campaign-banner-brief {
            font-size: 0.75rem;
            color: var(--text-muted);
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
        }
        .pd-campaign-banner-query { color: var(--text-secondary); }
        .pd-campaign-return-btn {
            background: rgba(96,165,250,0.15) !important;
            border-color: rgba(96,165,250,0.3) !important;
            color: #60a5fa !important;
            flex-shrink: 0;
            font-size: 0.75rem !important;
            padding: 0.4rem 0.8rem !important;
        }
        .pd-campaign-return-btn:hover {
            background: rgba(96,165,250,0.25) !important;
        }

        .pd-btn {
            padding: 0.6rem 1.1rem;
            border-radius: 8px;
            font-size: 0.8rem;
            cursor: pointer;
            display: flex;
            align-items: center;
            gap: 0.5rem;
            transition: all 0.2s ease;
            font-family: inherit;
            font-weight: 500;
        }
        .pd-btn svg { width: 16px; height: 16px; }
        .pd-btn.secondary {
            background: rgba(255,255,255,0.04);
            border: 1px solid rgba(255,255,255,0.1);
            color: var(--text-primary);
        }
        .pd-btn.secondary:hover { background: rgba(255,255,255,0.08); border-color: rgba(212,168,83,0.4); }
        .pd-btn.primary {
            background: linear-gradient(135deg, var(--gold-primary), #c9a54a);
            border: none;
            color: #0a0a0f;
            font-weight: 600;
            box-shadow: 0 2px 12px rgba(212,168,83,0.25);
        }
        .pd-btn.primary:hover { transform: translateY(-1px); box-shadow: 0 4px 20px rgba(212,168,83,0.4); }
        
        /* Prominent Send Button */
        .pd-btn.send-proposal {
            background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
            border: none;
            color: white;
            font-weight: 600;
            font-size: 0.9rem;
            padding: 0.75rem 1.5rem;
            box-shadow: 0 4px 16px rgba(34, 197, 94, 0.35);
            position: relative;
            overflow: hidden;
        }
        .pd-btn.send-proposal::before {
            content: '';
            position: absolute;
            top: 0;
            left: -100%;
            width: 100%;
            height: 100%;
            background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
            transition: left 0.5s ease;
        }
        .pd-btn.send-proposal:hover::before {
            left: 100%;
        }
        .pd-btn.send-proposal:hover { 
            transform: translateY(-2px); 
            box-shadow: 0 6px 24px rgba(34, 197, 94, 0.5);
        }
        .pd-btn.send-proposal svg {
            width: 18px;
            height: 18px;
        }
        
        .pd-close-btn {
            background: transparent;
            border: none;
            color: var(--text-muted);
            cursor: pointer;
            padding: 0.5rem;
            margin-left: 0.5rem;
            border-radius: 6px;
            transition: all 0.15s ease;
        }
        .pd-close-btn:hover { background: rgba(255,255,255,0.05); color: var(--text-primary); }

        /* Header Dropdown Menus */
        .pd-dropdown-item {
            display: flex;
            align-items: center;
            gap: 0.5rem;
            width: 100%;
            padding: 0.5rem 0.75rem;
            border: none;
            background: transparent;
            color: var(--text-secondary);
            font-size: 0.78rem;
            font-family: inherit;
            cursor: pointer;
            border-radius: 6px;
            transition: all 0.15s ease;
            text-align: left;
        }
        .pd-dropdown-item:hover {
            background: rgba(255,255,255,0.06);
            color: var(--text-primary);
        }
        .pd-dropdown-item svg {
            width: 14px;
            height: 14px;
            flex-shrink: 0;
        }

        /* Workflow Stage Indicator Bar */
        .pd-workflow-bar {
            display: flex;
            align-items: center;
            gap: 0;
            padding: 0.4rem 1rem;
            background: rgba(212,168,83,0.04);
            border-bottom: 1px solid rgba(212,168,83,0.1);
            flex-shrink: 0;
        }
        .pd-wf-stage {
            font-size: 0.65rem;
            padding: 0.2rem 0.6rem;
            border-radius: 4px;
            color: var(--text-muted);
            white-space: nowrap;
            font-family: 'Inter', sans-serif;
        }
        .pd-wf-stage.active {
            background: rgba(212,168,83,0.15);
            color: #D4A853;
            font-weight: 600;
        }
        .pd-wf-stage.complete {
            color: #4ade80;
        }
        .pd-wf-connector {
            width: 20px;
            height: 1px;
            background: rgba(255,255,255,0.1);
            flex-shrink: 0;
        }

        /* ===== PRE-SEND READINESS CHECKLIST ===== */
        .pd-send-checklist {
            padding: 16px;
            margin-bottom: 16px;
            background: rgba(0,0,0,0.3);
            border: 1px solid rgba(255,255,255,0.08);
            border-radius: 10px;
        }
        .pd-send-checklist-header {
            display: flex;
            align-items: center;
            gap: 16px;
            margin-bottom: 16px;
        }
        .pd-send-score-ring {
            position: relative;
            width: 64px;
            height: 64px;
            flex-shrink: 0;
        }
        .pd-send-score-ring svg {
            transform: rotate(-90deg);
        }
        .pd-send-score-ring .score-text {
            position: absolute;
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%);
            font-size: 1.1rem;
            font-weight: 700;
            font-family: 'Space Grotesk', sans-serif;
        }
        .pd-send-score-ring .score-label {
            position: absolute;
            bottom: -2px;
            left: 50%;
            transform: translateX(-50%);
            font-size: 0.55rem;
            text-transform: uppercase;
            letter-spacing: 0.08em;
            white-space: nowrap;
        }
        .pd-send-check-item {
            display: flex;
            align-items: center;
            gap: 10px;
            padding: 7px 10px;
            border-radius: 6px;
            font-size: 0.82rem;
            transition: background 0.15s;
        }
        .pd-send-check-item.clickable {
            cursor: pointer;
        }
        .pd-send-check-item.clickable:hover {
            background: rgba(255,255,255,0.04);
        }
        .pd-send-check-item .check-icon {
            width: 18px;
            height: 18px;
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            flex-shrink: 0;
            font-size: 0.7rem;
        }
        .pd-send-check-pass .check-icon {
            background: rgba(52,211,153,0.15);
            color: #34d399;
        }
        .pd-send-check-fail .check-icon {
            background: rgba(239,68,68,0.15);
            color: #f87171;
        }
        .pd-send-check-pass .check-label {
            color: rgba(255,255,255,0.5);
        }
        .pd-send-check-fail .check-label {
            color: #f5f5f5;
        }
        .pd-send-check-fail .check-fix {
            margin-left: auto;
            font-size: 0.7rem;
            color: rgba(212,168,83,0.7);
            white-space: nowrap;
        }
        .pd-send-gate {
            margin-top: 12px;
            padding: 10px 14px;
            border-radius: 8px;
            font-size: 0.8rem;
            display: flex;
            align-items: center;
            gap: 8px;
        }
        .pd-send-gate.ready {
            background: rgba(52,211,153,0.08);
            border: 1px solid rgba(52,211,153,0.2);
            color: #34d399;
        }
        .pd-send-gate.warning {
            background: rgba(245,158,11,0.08);
            border: 1px solid rgba(245,158,11,0.2);
            color: #fbbf24;
        }
        .pd-send-gate.blocked {
            background: rgba(239,68,68,0.06);
            border: 1px solid rgba(239,68,68,0.15);
            color: #f87171;
        }

        .pd-body {
            flex: 1;
            display: flex;
            overflow: hidden;
        }
        
        /* Section List Panel */
        .pd-sections-panel {
            width: 280px;
            border-right: 1px solid rgba(255,255,255,0.06);
            background: linear-gradient(180deg, rgba(0,0,0,0.4) 0%, rgba(0,0,0,0.2) 100%);
            display: flex;
            flex-direction: column;
            overflow: hidden;
        }
        .pd-sections-header {
            padding: 1.25rem 1rem;
            border-bottom: 1px solid rgba(255,255,255,0.06);
        }
        .pd-sections-title {
            font-size: 0.65rem;
            color: var(--gold-primary);
            letter-spacing: 0.15em;
            text-transform: uppercase;
            margin-bottom: 0;
            display: flex;
            align-items: center;
            gap: 0.5rem;
        }
        .pd-sections-title::before {
            content: '';
            display: inline-block;
            width: 8px;
            height: 8px;
            background: var(--gold-primary);
            border-radius: 2px;
            opacity: 0.6;
        }
        .pd-sections-count {
            background: rgba(212,168,83,0.15);
            color: var(--gold-primary);
            font-size: 0.65rem;
            padding: 0.15rem 0.5rem;
            border-radius: 10px;
            margin-left: auto;
        }
        .pd-sections-list {
            flex: 1;
            overflow-y: auto;
            padding: 0.75rem;
        }
        .pd-section-item {
            background: rgba(255,255,255,0.02);
            border: 1px solid rgba(255,255,255,0.04);
            border-radius: 10px;
            padding: 0.9rem 1rem;
            margin-bottom: 0.6rem;
            cursor: pointer;
            transition: all 0.2s ease;
            position: relative;
        }
        .pd-section-item::before {
            content: '';
            position: absolute;
            left: 0;
            top: 50%;
            transform: translateY(-50%);
            width: 3px;
            height: 0;
            background: linear-gradient(180deg, var(--gold-primary), #b8923f);
            border-radius: 0 2px 2px 0;
            transition: height 0.2s ease;
        }
        .pd-section-item:hover { 
            background: rgba(255,255,255,0.04); 
            border-color: rgba(255,255,255,0.08);
        }
        .pd-section-item.active {
            background: linear-gradient(135deg, rgba(212,168,83,0.08), rgba(212,168,83,0.03));
            border-color: rgba(212,168,83,0.25);
        }
        .pd-section-item.active::before { height: 60%; }
        .pd-section-item-header {
            display: flex;
            justify-content: space-between;
            align-items: flex-start;
        }
        .pd-section-item-info { flex: 1; }
        .pd-section-item-num {
            font-size: 0.65rem;
            color: var(--text-muted);
            display: flex;
            align-items: center;
            gap: 0.4rem;
        }
        .pd-section-item-type {
            font-size: 0.65rem;
            color: var(--gold-primary);
            opacity: 0.7;
        }
        .pd-section-item-title {
            font-size: 0.9rem;
            font-weight: 500;
            margin-top: 0.35rem;
            color: var(--text-primary);
            line-height: 1.3;
        }
        .pd-section-item.active .pd-section-item-title { color: var(--gold-primary); }
        .pd-section-move-btns {
            display: flex;
            flex-direction: column;
            gap: 0;
            opacity: 0;
            transition: opacity 0.15s ease;
        }
        .pd-section-item:hover .pd-section-move-btns { opacity: 1; }
        .pd-section-move-btn {
            background: transparent;
            border: none;
            color: var(--text-muted);
            cursor: pointer;
            padding: 3px 6px;
            font-size: 0.7rem;
            border-radius: 4px;
            transition: all 0.15s ease;
        }
        .pd-section-move-btn:hover { color: var(--gold-primary); background: rgba(212,168,83,0.1); }
        .pd-section-move-btn:disabled { color: rgba(255,255,255,0.1); cursor: not-allowed; background: transparent; }
        
        .pd-add-section {
            padding: 1rem;
            border-top: 1px solid rgba(255,255,255,0.06);
            background: rgba(0,0,0,0.2);
        }
        .pd-add-section-title {
            font-size: 0.6rem;
            color: var(--text-muted);
            letter-spacing: 0.12em;
            text-transform: uppercase;
            margin-bottom: 0.6rem;
        }
        .pd-add-section-btns {
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 0.4rem;
        }
        .pd-add-btn {
            background: rgba(255,255,255,0.03);
            border: 1px dashed rgba(255,255,255,0.1);
            color: var(--text-secondary);
            padding: 0.5rem 0.6rem;
            border-radius: 6px;
            font-size: 0.72rem;
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 0.35rem;
            font-family: inherit;
            transition: all 0.2s ease;
        }
        .pd-add-btn:hover { 
            border-color: var(--gold-primary); 
            border-style: solid;
            color: var(--gold-primary); 
            background: rgba(212,168,83,0.08);
        }
        .pd-add-section-btn {
            background: rgba(255,255,255,0.03);
            border: 1px dashed rgba(255,255,255,0.1);
            color: var(--text-secondary);
            padding: 0.4rem 0.5rem;
            border-radius: 6px;
            font-size: 0.7rem;
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 0.3rem;
            font-family: inherit;
            transition: all 0.2s ease;
        }
        .pd-add-section-btn:hover { 
            border-color: var(--gold-primary); 
            border-style: solid;
            color: var(--gold-primary); 
            background: rgba(212,168,83,0.08);
        }
        
        /* Editor Panel */
        .pd-editor-panel {
            flex: 1;
            display: flex;
            flex-direction: column;
            overflow: hidden;
            background: linear-gradient(160deg, #0c0c14 0%, #0a0a10 100%);
            position: relative;
        }
        .pd-editor-panel::before {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            right: 0;
            height: 150px;
            background: radial-gradient(ellipse at top, rgba(212,168,83,0.03) 0%, transparent 70%);
            pointer-events: none;
        }
        .pd-editor-scroll {
            flex: 1;
            overflow-y: auto;
            padding: 2rem 3rem;
            position: relative;
            z-index: 1;
        }
        .pd-editor-type-badge {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 2rem;
            padding-bottom: 1.25rem;
            border-bottom: 1px solid rgba(255,255,255,0.06);
        }
        .pd-editor-type {
            display: flex;
            align-items: center;
            gap: 0.6rem;
            font-size: 0.7rem;
            color: var(--text-muted);
            letter-spacing: 0.12em;
            text-transform: uppercase;
        }
        .pd-editor-type span { font-size: 1.2rem; }
        .pd-delete-btn {
            background: rgba(239,68,68,0.08);
            border: 1px solid rgba(239,68,68,0.2);
            color: #ef4444;
            padding: 0.45rem 0.9rem;
            border-radius: 6px;
            font-size: 0.72rem;
            cursor: pointer;
            font-family: inherit;
            transition: all 0.2s ease;
        }
        .pd-delete-btn:hover { background: rgba(239,68,68,0.15); border-color: rgba(239,68,68,0.4); }
        
        .pd-field {
            margin-bottom: 1.75rem;
        }
        .pd-field label {
            display: block;
            font-size: 0.65rem;
            color: var(--gold-primary);
            letter-spacing: 0.12em;
            text-transform: uppercase;
            margin-bottom: 0.6rem;
            opacity: 0.8;
        }
        .pd-field input[type="text"],
        .pd-field input[type="number"],
        .pd-field textarea,
        .pd-field select {
            width: 100%;
            background: rgba(0,0,0,0.4);
            border: 1px solid rgba(255,255,255,0.08);
            color: var(--text-primary);
            padding: 0.9rem 1.1rem;
            border-radius: 10px;
            font-family: 'Inter', sans-serif;
            font-size: 1.05rem;
            transition: all 0.2s ease;
        }
        .pd-field input:focus,
        .pd-field textarea:focus,
        .pd-field select:focus {
            outline: none;
            border-color: rgba(212,168,83,0.5);
            box-shadow: 0 0 0 3px rgba(212,168,83,0.08);
            background: rgba(0,0,0,0.5);
        }
        .pd-field textarea {
            min-height: 120px;
            resize: vertical;
            line-height: 1.7;
        }
        .pd-field-title input {
            font-size: 1.6rem;
            font-weight: 500;
            letter-spacing: -0.01em;
        }
        
        .pd-pricing-config {
            background: linear-gradient(135deg, rgba(34,197,94,0.08) 0%, rgba(34,197,94,0.02) 100%);
            border: 1px solid rgba(34,197,94,0.2);
            border-radius: 16px;
            padding: 1.75rem;
            margin-bottom: 1.75rem;
            position: relative;
            overflow: hidden;
        }
        .pd-pricing-config::before {
            content: '';
            position: absolute;
            top: 0;
            right: 0;
            width: 120px;
            height: 120px;
            background: radial-gradient(circle, rgba(34,197,94,0.1) 0%, transparent 70%);
            pointer-events: none;
        }
        .pd-pricing-config-title {
            font-size: 0.65rem;
            color: #4ade80;
            letter-spacing: 0.14em;
            text-transform: uppercase;
            margin-bottom: 1.25rem;
            display: flex;
            align-items: center;
            gap: 0.5rem;
        }
        .pd-pricing-config-title::before {
            content: ‘\1F4B0’;
            font-size: 0.9rem;
        }
        .pd-pricing-grid {
            display: grid;
            grid-template-columns: repeat(3, 1fr);
            gap: 1.25rem;
        }
        .pd-pricing-field {
            display: flex;
            flex-direction: column;
        }
        .pd-pricing-field label {
            font-size: 0.65rem;
            color: var(--text-muted);
            margin-bottom: 0.6rem;
            letter-spacing: 0.06em;
        }
        .pd-pricing-field input,
        .pd-pricing-field select {
            padding: 0.85rem 1rem;
            font-size: 0.95rem;
            background: rgba(0,0,0,0.3);
            border: 1px solid rgba(34,197,94,0.2);
            border-radius: 10px;
            color: var(--text-primary);
            transition: all 0.2s ease;
        }
        .pd-pricing-field input:focus,
        .pd-pricing-field select:focus {
            outline: none;
            border-color: rgba(34,197,94,0.5);
            box-shadow: 0 0 0 3px rgba(34,197,94,0.1);
        }
        .pd-pricing-field input[type="number"] {
            color: #4ade80;
            font-size: 1.4rem;
            font-weight: 600;
            text-align: center;
        }
        .pd-pricing-field select {
            cursor: pointer;
        }
        
        .pd-highlights-list {
            display: flex;
            flex-direction: column;
            gap: 0.6rem;
            margin-bottom: 0.9rem;
        }
        .pd-highlight-item {
            display: flex;
            gap: 0.6rem;
            align-items: center;
        }
        .pd-highlight-item span {
            color: var(--gold-primary);
            width: 24px;
            flex-shrink: 0;
            text-align: center;
        }
        .pd-highlight-item input {
            flex: 1;
            padding: 0.65rem 0.9rem;
            font-size: 0.95rem;
        }
        .pd-highlight-remove {
            background: transparent;
            border: none;
            color: var(--text-muted);
            cursor: pointer;
            padding: 0.35rem;
            font-size: 1.1rem;
            border-radius: 4px;
            transition: all 0.15s ease;
        }
        .pd-highlight-remove:hover { color: #ef4444; background: rgba(239,68,68,0.1); }
        .pd-highlight-add {
            background: rgba(212,168,83,0.08);
            border: 1px dashed rgba(212,168,83,0.3);
            color: var(--gold-primary);
            padding: 0.5rem 0.9rem;
            border-radius: 6px;
            font-size: 0.72rem;
            cursor: pointer;
            align-self: flex-start;
            font-family: inherit;
            transition: all 0.2s ease;
        }
        .pd-highlight-add:hover { background: rgba(212,168,83,0.15); border-style: solid; }
        
        .pd-transparency-panel {
            background: linear-gradient(135deg, rgba(251,191,36,0.06) 0%, rgba(251,191,36,0.01) 100%);
            border: 1px solid rgba(251,191,36,0.15);
            border-radius: 16px;
            padding: 1.75rem;
            margin-top: 2rem;
            position: relative;
        }
        .pd-transparency-header {
            display: flex;
            justify-content: space-between;
            align-items: flex-start;
            margin-bottom: 1.25rem;
        }
        .pd-transparency-title {
            font-size: 0.65rem;
            color: #fbbf24;
            letter-spacing: 0.14em;
            text-transform: uppercase;
            display: flex;
            align-items: center;
            gap: 0.5rem;
            margin: 0;
        }
        .pd-transparency-title::before {
            content: ‘\1F4A1’;
            font-size: 0.9rem;
        }
        .pd-transparency-subtitle {
            font-size: 0.75rem;
            color: var(--text-muted);
            margin-top: 0.35rem;
            font-style: italic;
        }
        .pd-transparency-generate-btn {
            background: linear-gradient(135deg, rgba(251,191,36,0.15), rgba(251,191,36,0.08));
            border: 1px solid rgba(251,191,36,0.3);
            color: #fbbf24;
            padding: 0.5rem 1rem;
            border-radius: 8px;
            font-size: 0.75rem;
            cursor: pointer;
            font-family: inherit;
            display: flex;
            align-items: center;
            gap: 0.4rem;
            transition: all 0.2s ease;
            white-space: nowrap;
        }
        .pd-transparency-generate-btn:hover {
            background: rgba(251,191,36,0.25);
            transform: translateY(-1px);
        }
        .pd-transparency-generate-btn:disabled {
            opacity: 0.5;
            cursor: not-allowed;
            transform: none;
        }
        .pd-transparency-field {
            margin-bottom: 1.25rem;
        }
        .pd-transparency-field:last-child { margin-bottom: 0; }
        .pd-transparency-field label {
            font-size: 0.65rem;
            color: var(--text-muted);
            margin-bottom: 0.6rem;
            display: block;
            letter-spacing: 0.06em;
        }
        .pd-transparency-field input {
            color: #fbbf24;
            font-weight: 500;
            background: rgba(0,0,0,0.3);
            border: 1px solid rgba(251,191,36,0.15);
            border-radius: 10px;
            padding: 0.85rem 1rem;
            width: 100%;
            transition: all 0.2s ease;
        }
        .pd-transparency-field input:focus {
            outline: none;
            border-color: rgba(251,191,36,0.4);
            box-shadow: 0 0 0 3px rgba(251,191,36,0.1);
        }
        .pd-transparency-field textarea {
            min-height: 120px;
            font-size: 0.95rem;
            line-height: 1.6;
            background: rgba(0,0,0,0.3);
            border: 1px solid rgba(251,191,36,0.15);
            border-radius: 10px;
            padding: 1rem;
            width: 100%;
            resize: vertical;
            transition: all 0.2s ease;
        }
        .pd-transparency-field textarea:focus {
            outline: none;
            border-color: rgba(251,191,36,0.4);
            box-shadow: 0 0 0 3px rgba(251,191,36,0.1);
        }
        .pd-transparency-field textarea::placeholder {
            color: var(--text-muted);
            opacity: 0.6;
        }
        
        /* Multi-Explanation System */
        .pd-transparency-header {
            display: flex;
            justify-content: space-between;
            align-items: flex-start;
            gap: 1rem;
            margin-bottom: 1.25rem;
            flex-wrap: wrap;
        }
        .pd-transparency-title::before {
            content: none;
        }
        .pd-transparency-actions {
            display: flex;
            gap: 0.5rem;
        }
        .pd-transparency-add-btn,
        .pd-transparency-library-btn {
            background: rgba(251,191,36,0.1);
            border: 1px solid rgba(251,191,36,0.25);
            color: #fbbf24;
            padding: 0.45rem 0.85rem;
            border-radius: 6px;
            font-size: 0.7rem;
            cursor: pointer;
            font-family: inherit;
            display: flex;
            align-items: center;
            gap: 0.35rem;
            transition: all 0.2s ease;
        }
        .pd-transparency-add-btn:hover,
        .pd-transparency-library-btn:hover {
            background: rgba(251,191,36,0.2);
        }
        .pd-transparency-library-btn {
            background: rgba(139,92,246,0.1);
            border-color: rgba(139,92,246,0.25);
            color: #a78bfa;
        }
        .pd-transparency-library-btn:hover {
            background: rgba(139,92,246,0.2);
        }
        .pd-explanations-list {
            display: flex;
            flex-direction: column;
            gap: 1rem;
        }
        .pd-explanations-empty {
            text-align: center;
            padding: 2rem;
            color: var(--text-muted);
            font-size: 0.9rem;
            background: rgba(0,0,0,0.2);
            border-radius: 12px;
            border: 1px dashed rgba(251,191,36,0.2);
        }
        .pd-explanations-empty-hint {
            font-size: 0.75rem;
            margin-top: 0.5rem;
            opacity: 0.7;
        }
        .pd-explanation-item {
            background: rgba(0,0,0,0.25);
            border: 1px solid rgba(251,191,36,0.12);
            border-radius: 12px;
            overflow: hidden;
        }
        .pd-explanation-item-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 0.6rem 1rem;
            background: rgba(251,191,36,0.05);
            border-bottom: 1px solid rgba(251,191,36,0.1);
        }
        .pd-explanation-item-num {
            width: 24px;
            height: 24px;
            background: rgba(251,191,36,0.15);
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 0.7rem;
            color: #fbbf24;
            font-weight: 600;
        }
        .pd-explanation-item-actions {
            display: flex;
            gap: 0.35rem;
        }
        .pd-exp-action-btn {
            width: 26px;
            height: 26px;
            border-radius: 6px;
            border: none;
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            transition: all 0.2s ease;
        }
        .pd-exp-action-btn.generate {
            background: rgba(59,130,246,0.15);
            color: #60a5fa;
        }
        .pd-exp-action-btn.generate:hover:not(:disabled) {
            background: rgba(59,130,246,0.25);
        }
        .pd-exp-action-btn.save {
            background: rgba(34,197,94,0.15);
            color: #4ade80;
        }
        .pd-exp-action-btn.save:hover {
            background: rgba(34,197,94,0.25);
        }
        .pd-exp-action-btn.delete {
            background: rgba(239,68,68,0.15);
            color: #f87171;
        }
        .pd-exp-action-btn.delete:hover {
            background: rgba(239,68,68,0.25);
        }
        .pd-exp-action-btn:disabled {
            opacity: 0.4;
            cursor: not-allowed;
        }
        .pd-explanation-fields {
            padding: 1rem;
        }
        .pd-explanation-fields .pd-transparency-field {
            margin-bottom: 0.85rem;
        }
        .pd-explanation-fields .pd-transparency-field:last-child {
            margin-bottom: 0;
        }
        .pd-explanation-fields textarea {
            min-height: 80px;
        }
        
        /* Research Context Selector */
        .pd-research-context-selector {
            background: rgba(59,130,246,0.06);
            border: 1px solid rgba(59,130,246,0.15);
            border-radius: 10px;
            margin-bottom: 1rem;
            overflow: hidden;
        }
        .pd-research-context-header {
            display: flex;
            align-items: center;
            gap: 0.75rem;
            padding: 0.75rem 1rem;
            cursor: pointer;
            transition: background 0.2s ease;
        }
        .pd-research-context-header:hover {
            background: rgba(59,130,246,0.08);
        }
        .pd-research-context-header > span:first-child {
            font-size: 0.8rem;
            color: #60a5fa;
        }
        .pd-research-context-badge {
            background: rgba(59,130,246,0.2);
            color: #60a5fa;
            font-size: 0.65rem;
            padding: 0.2rem 0.5rem;
            border-radius: 4px;
        }
        .pd-research-context-chevron {
            margin-left: auto;
            color: #60a5fa;
            transition: transform 0.2s ease;
        }
        .pd-research-context-list.open + .pd-research-context-chevron {
            transform: rotate(180deg);
        }
        .pd-research-context-list {
            border-top: 1px solid rgba(59,130,246,0.1);
            padding: 0.75rem;
            max-height: 300px;
            overflow-y: auto;
        }
        .pd-research-context-actions {
            display: flex;
            gap: 0.5rem;
            margin-bottom: 0.75rem;
            padding-bottom: 0.75rem;
            border-bottom: 1px solid rgba(59,130,246,0.1);
        }
        .pd-research-context-actions button {
            background: rgba(59,130,246,0.1);
            border: 1px solid rgba(59,130,246,0.2);
            color: #60a5fa;
            padding: 0.35rem 0.65rem;
            border-radius: 4px;
            font-size: 0.65rem;
            cursor: pointer;
            transition: all 0.2s ease;
        }
        .pd-research-context-actions button:hover {
            background: rgba(59,130,246,0.2);
        }
        .pd-research-context-item {
            display: flex;
            align-items: center;
            gap: 0.6rem;
            padding: 0.5rem 0.6rem;
            border-radius: 6px;
            cursor: pointer;
            transition: background 0.15s ease;
        }
        .pd-research-context-item:hover:not(.disabled) {
            background: rgba(59,130,246,0.1);
        }
        .pd-research-context-item.disabled {
            opacity: 0.4;
            cursor: not-allowed;
        }
        .pd-research-context-item input[type="checkbox"] {
            width: 16px;
            height: 16px;
            accent-color: #60a5fa;
        }
        .pd-research-context-icon {
            font-size: 0.9rem;
        }
        .pd-research-context-title {
            flex: 1;
            font-size: 0.8rem;
            color: var(--text-secondary);
        }
        .pd-research-context-check {
            color: #4ade80;
            font-size: 0.75rem;
        }
        .pd-research-context-none {
            color: var(--text-muted);
            font-size: 0.65rem;
            font-style: italic;
        }
        
        /* Explanation Library Modal */
        .pd-library-modal {
            position: fixed;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background: rgba(0,0,0,0.85);
            backdrop-filter: blur(6px);
            display: none;
            align-items: center;
            justify-content: center;
            z-index: 10002;
        }
        .pd-library-modal.active {
            display: flex;
        }
        .pd-library-modal-content {
            background: linear-gradient(180deg, #16161e 0%, #0e0e14 100%);
            border: 1px solid rgba(139,92,246,0.25);
            border-radius: 16px;
            width: 100%;
            max-width: 600px;
            max-height: 80vh;
            display: flex;
            flex-direction: column;
            overflow: hidden;
        }
        .pd-library-modal-header {
            padding: 1.25rem 1.5rem;
            border-bottom: 1px solid rgba(255,255,255,0.06);
            display: flex;
            justify-content: space-between;
            align-items: center;
        }
        .pd-library-modal-title {
            font-family: 'Space Grotesk', sans-serif;
            font-size: 1.1rem;
            color: #a78bfa;
            display: flex;
            align-items: center;
            gap: 0.6rem;
        }
        .pd-library-modal-close {
            background: transparent;
            border: none;
            color: var(--text-muted);
            cursor: pointer;
            padding: 0.4rem;
            border-radius: 6px;
        }
        .pd-library-modal-close:hover {
            background: rgba(255,255,255,0.05);
            color: var(--text-primary);
        }
        .pd-library-modal-body {
            flex: 1;
            overflow-y: auto;
            padding: 1rem 1.5rem;
        }
        .pd-library-empty {
            text-align: center;
            padding: 3rem 2rem;
            color: var(--text-muted);
        }
        .pd-library-empty-icon {
            font-size: 2.5rem;
            margin-bottom: 0.75rem;
        }
        .pd-library-item {
            background: rgba(255,255,255,0.03);
            border: 1px solid rgba(255,255,255,0.06);
            border-radius: 10px;
            padding: 1rem;
            margin-bottom: 0.75rem;
            cursor: pointer;
            transition: all 0.2s ease;
        }
        .pd-library-item:hover {
            background: rgba(139,92,246,0.08);
            border-color: rgba(139,92,246,0.2);
        }
        .pd-library-item-prompt {
            font-size: 0.95rem;
            color: #a78bfa;
            font-weight: 500;
            margin-bottom: 0.4rem;
        }
        .pd-library-item-preview {
            font-size: 0.8rem;
            color: var(--text-muted);
            line-height: 1.5;
            overflow: hidden;
            text-overflow: ellipsis;
            display: -webkit-box;
            -webkit-line-clamp: 2;
            -webkit-box-orient: vertical;
        }
        .pd-library-item-meta {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-top: 0.6rem;
            padding-top: 0.6rem;
            border-top: 1px solid rgba(255,255,255,0.05);
        }
        .pd-library-item-date {
            font-size: 0.65rem;
            color: var(--text-muted);
        }
        .pd-library-item-delete {
            background: rgba(239,68,68,0.1);
            border: none;
            color: #f87171;
            padding: 0.3rem 0.6rem;
            border-radius: 4px;
            font-size: 0.65rem;
            cursor: pointer;
        }
        .pd-library-item-delete:hover {
            background: rgba(239,68,68,0.2);
        }
        
        /* Signature Section Styles */
        .pd-signature-config {
            background: linear-gradient(135deg, rgba(139,92,246,0.08) 0%, rgba(139,92,246,0.02) 100%);
            border: 1px solid rgba(139,92,246,0.2);
            border-radius: 16px;
            padding: 1.75rem;
            margin-bottom: 1.75rem;
        }
        .pd-signature-config-title {
            font-size: 0.65rem;
            color: #a78bfa;
            letter-spacing: 0.14em;
            text-transform: uppercase;
            margin-bottom: 1.25rem;
            display: flex;
            align-items: center;
            gap: 0.5rem;
        }
        .pd-signature-config-title::before {
            content: '�F';
            font-size: 0.9rem;
        }
        .pd-signature-preview {
            background: rgba(0,0,0,0.3);
            border: 1px dashed rgba(139,92,246,0.3);
            border-radius: 12px;
            padding: 2rem;
            margin-bottom: 1.5rem;
            text-align: center;
        }
        .pd-signature-preview-label {
            font-size: 0.75rem;
            color: var(--text-muted);
            margin-bottom: 1.5rem;
        }
        .pd-signature-line {
            height: 2px;
            background: linear-gradient(90deg, transparent, rgba(139,92,246,0.5), transparent);
            margin: 0 2rem 0.75rem;
        }
        .pd-signature-meta {
            display: flex;
            justify-content: space-between;
            padding: 0 2rem;
            font-size: 0.65rem;
            color: var(--text-muted);
            letter-spacing: 0.05em;
        }
        .pd-signature-options {
            display: flex;
            flex-direction: column;
            gap: 1rem;
        }
        .pd-signature-field {
            display: flex;
            flex-direction: column;
            gap: 0.5rem;
        }
        .pd-signature-field label {
            font-size: 0.65rem;
            color: var(--text-muted);
            letter-spacing: 0.05em;
        }
        .pd-signature-field input,
        .pd-signature-field textarea {
            background: rgba(0,0,0,0.3);
            border: 1px solid rgba(139,92,246,0.2);
            border-radius: 10px;
            padding: 0.85rem 1rem;
            color: var(--text-primary);
            font-size: 0.95rem;
            transition: all 0.2s ease;
        }
        .pd-signature-field input:focus,
        .pd-signature-field textarea:focus {
            outline: none;
            border-color: rgba(139,92,246,0.5);
            box-shadow: 0 0 0 3px rgba(139,92,246,0.1);
        }
        .pd-signature-field textarea {
            min-height: 80px;
            resize: vertical;
        }
        .pd-signature-checkbox {
            display: flex;
            align-items: center;
            gap: 0.75rem;
            cursor: pointer;
            padding: 0.5rem 0;
        }
        .pd-signature-checkbox input[type="checkbox"] {
            width: 18px;
            height: 18px;
            accent-color: #a78bfa;
            cursor: pointer;
        }
        .pd-signature-checkbox span {
            font-size: 0.85rem;
            color: var(--text-secondary);
        }
        .pd-add-btn.signature {
            background: rgba(139,92,246,0.1);
            border-color: rgba(139,92,246,0.3);
            color: #a78bfa;
        }
        .pd-add-btn.signature:hover {
            background: rgba(139,92,246,0.2);
        }
        
        /* Luminary Signature Section */
        .pd-signature-section-label {
            font-size: 0.6rem;
            color: var(--gold-primary);
            letter-spacing: 0.12em;
            margin-bottom: 0.75rem;
            padding-bottom: 0.5rem;
            border-bottom: 1px solid rgba(212,168,83,0.15);
        }
        .pd-signature-luminary-section {
            background: rgba(212,168,83,0.06);
            border: 1px solid rgba(212,168,83,0.15);
            border-radius: 12px;
            padding: 1.25rem;
            margin-bottom: 1.25rem;
        }
        .pd-signature-luminary-preview {
            display: flex;
            flex-direction: column;
            gap: 0.75rem;
        }
        .pd-signature-luminary-row {
            display: flex;
            gap: 1rem;
        }
        .pd-signature-luminary-field {
            flex: 1;
            display: flex;
            flex-direction: column;
            gap: 0.25rem;
        }
        .pd-signature-luminary-field.small {
            flex: 0.4;
        }
        .pd-signature-luminary-field input {
            background: rgba(0,0,0,0.4);
            border: 1px solid rgba(212,168,83,0.25);
            border-radius: 8px;
            padding: 0.7rem 0.9rem;
            color: var(--gold-primary);
            font-size: 0.95rem;
            font-family: 'Inter', sans-serif;
            font-style: italic;
        }
        .pd-signature-luminary-field input:focus {
            outline: none;
            border-color: rgba(212,168,83,0.5);
            box-shadow: 0 0 0 3px rgba(212,168,83,0.1);
        }
        .pd-sig-field-label {
            font-size: 0.6rem;
            color: var(--text-muted);
            letter-spacing: 0.05em;
        }
        .pd-signature-org-section {
            background: rgba(139,92,246,0.06);
            border: 1px solid rgba(139,92,246,0.15);
            border-radius: 12px;
            padding: 1.25rem;
            margin-bottom: 1.25rem;
        }
        .pd-signature-org-section .pd-signature-section-label {
            color: #a78bfa;
            border-color: rgba(139,92,246,0.15);
        }
        
        /* Media Section Styles */
        .pd-media-config {
            background: linear-gradient(135deg, rgba(59,130,246,0.08) 0%, rgba(59,130,246,0.02) 100%);
            border: 1px solid rgba(59,130,246,0.2);
            border-radius: 16px;
            padding: 1.75rem;
            margin-bottom: 1.75rem;
        }
        .pd-media-config-title {
            font-size: 0.65rem;
            color: #60a5fa;
            letter-spacing: 0.14em;
            text-transform: uppercase;
            margin-bottom: 1rem;
        }
        .pd-media-list {
            display: flex;
            flex-direction: column;
            gap: 0.75rem;
            margin-bottom: 1rem;
        }
        .pd-media-empty {
            text-align: center;
            padding: 2rem;
            color: var(--text-muted);
        }
        .pd-media-item {
            display: flex;
            gap: 0.75rem;
            background: rgba(0,0,0,0.2);
            border: 1px solid rgba(255,255,255,0.08);
            border-radius: 8px;
            padding: 0.75rem;
            align-items: flex-start;
        }
        .pd-media-item-preview {
            width: 80px;
            height: 60px;
            background: rgba(0,0,0,0.3);
            border-radius: 6px;
            overflow: hidden;
            display: flex;
            align-items: center;
            justify-content: center;
            flex-shrink: 0;
        }
        .pd-media-item-preview img {
            width: 100%;
            height: 100%;
            object-fit: cover;
        }
        .pd-media-video-icon {
            font-size: 1.5rem;
        }
        .pd-media-item-details {
            flex: 1;
            display: flex;
            flex-direction: column;
            gap: 0.4rem;
        }
        .pd-media-item-details select,
        .pd-media-item-details input {
            padding: 0.4rem 0.6rem;
            background: rgba(0,0,0,0.3);
            border: 1px solid rgba(255,255,255,0.1);
            border-radius: 4px;
            color: var(--text-primary);
            font-size: 0.8rem;
        }
        .pd-media-item-remove {
            background: rgba(239,68,68,0.2);
            border: none;
            color: #f87171;
            width: 24px;
            height: 24px;
            border-radius: 4px;
            cursor: pointer;
            font-size: 1rem;
        }
        .pd-media-add-row {
            display: flex;
            gap: 0.5rem;
        }
        .pd-media-add-btn {
            flex: 1;
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 0.4rem;
            padding: 0.6rem;
            background: rgba(59,130,246,0.15);
            border: 1px dashed rgba(59,130,246,0.3);
            border-radius: 8px;
            color: #60a5fa;
            font-size: 0.8rem;
            cursor: pointer;
            transition: all 0.2s;
        }
        .pd-media-add-btn:hover {
            background: rgba(59,130,246,0.25);
            border-style: solid;
        }
        
        /* Freeform/Custom Page Styles */
        .pd-freeform-config {
            background: linear-gradient(135deg, rgba(236,72,153,0.08) 0%, rgba(236,72,153,0.02) 100%);
            border: 1px solid rgba(236,72,153,0.2);
            border-radius: 16px;
            padding: 1.75rem;
            margin-bottom: 1.75rem;
        }
        .pd-freeform-config-title {
            font-size: 0.65rem;
            color: #f472b6;
            letter-spacing: 0.14em;
            text-transform: uppercase;
            margin-bottom: 1rem;
        }
        .pd-freeform-layouts {
            display: flex;
            gap: 0.5rem;
            margin-bottom: 1rem;
        }
        .pd-freeform-layout-btn {
            width: 50px;
            height: 40px;
            background: rgba(0,0,0,0.2);
            border: 1px solid rgba(255,255,255,0.1);
            border-radius: 6px;
            cursor: pointer;
            padding: 0.3rem;
            transition: all 0.2s;
        }
        .pd-freeform-layout-btn:hover {
            border-color: rgba(236,72,153,0.5);
        }
        .pd-freeform-layout-btn.active {
            border-color: #f472b6;
            background: rgba(236,72,153,0.2);
        }
        .pd-layout-icon {
            width: 100%;
            height: 100%;
            background: rgba(255,255,255,0.1);
            border-radius: 3px;
        }
        .pd-layout-icon.single { background: rgba(255,255,255,0.2); }
        .pd-layout-icon.two-col {
            background: linear-gradient(90deg, rgba(255,255,255,0.2) 48%, transparent 48%, transparent 52%, rgba(255,255,255,0.2) 52%);
        }
        .pd-layout-icon.sidebar-l {
            background: linear-gradient(90deg, rgba(255,255,255,0.15) 30%, transparent 30%, transparent 34%, rgba(255,255,255,0.2) 34%);
        }
        .pd-layout-icon.sidebar-r {
            background: linear-gradient(90deg, rgba(255,255,255,0.2) 66%, transparent 66%, transparent 70%, rgba(255,255,255,0.15) 70%);
        }
        .pd-freeform-style-options {
            display: flex;
            gap: 1rem;
            margin-bottom: 1rem;
        }
        .pd-freeform-style-row {
            flex: 1;
        }
        .pd-freeform-style-row label {
            display: block;
            font-size: 0.65rem;
            color: var(--text-muted);
            margin-bottom: 0.3rem;
        }
        .pd-freeform-style-row select {
            width: 100%;
            padding: 0.5rem;
            background: rgba(0,0,0,0.3);
            border: 1px solid rgba(255,255,255,0.1);
            border-radius: 6px;
            color: var(--text-primary);
            font-size: 0.8rem;
        }
        .pd-freeform-blocks-list {
            display: flex;
            flex-direction: column;
            gap: 0.5rem;
            margin-bottom: 0.75rem;
        }
        .pd-freeform-blocks-empty {
            text-align: center;
            padding: 1.5rem;
            color: var(--text-muted);
            font-size: 0.85rem;
        }
        .pd-freeform-block {
            background: rgba(0,0,0,0.2);
            border: 1px solid rgba(255,255,255,0.08);
            border-radius: 8px;
            padding: 0.75rem;
        }
        .pd-freeform-block-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 0.5rem;
            font-size: 0.75rem;
            color: var(--text-secondary);
            text-transform: capitalize;
        }
        .pd-freeform-block-header button {
            background: transparent;
            border: none;
            color: var(--text-muted);
            cursor: pointer;
            font-size: 1rem;
        }
        .pd-freeform-block textarea,
        .pd-freeform-block input {
            width: 100%;
            padding: 0.5rem;
            background: rgba(0,0,0,0.3);
            border: 1px solid rgba(255,255,255,0.1);
            border-radius: 4px;
            color: var(--text-primary);
            font-size: 0.85rem;
            resize: vertical;
        }
        .pd-freeform-block textarea {
            min-height: 60px;
        }
        .pd-freeform-add-blocks {
            display: flex;
            flex-wrap: wrap;
            gap: 0.4rem;
        }
        .pd-freeform-add-blocks button {
            padding: 0.4rem 0.6rem;
            background: rgba(236,72,153,0.1);
            border: 1px solid rgba(236,72,153,0.2);
            border-radius: 4px;
            color: #f472b6;
            font-size: 0.7rem;
            cursor: pointer;
            transition: all 0.2s;
        }
        .pd-freeform-add-blocks button:hover {
            background: rgba(236,72,153,0.2);
        }
        
        /* Send/Preview Modal */
        .pd-send-modal {
            position: fixed;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background: rgba(0,0,0,0.85);
            backdrop-filter: blur(8px);
            display: none;
            align-items: center;
            justify-content: center;
            z-index: 10001;
            padding: 2rem;
        }
        .pd-send-modal.active {
            display: flex;
        }
        .pd-send-modal-content {
            background: linear-gradient(180deg, #12121a 0%, #0a0a10 100%);
            border: 1px solid rgba(212,168,83,0.2);
            border-radius: 20px;
            width: 100%;
            max-width: 900px;
            max-height: 85vh;
            overflow: hidden;
            display: flex;
            flex-direction: column;
            box-shadow: 0 25px 80px rgba(0,0,0,0.6);
        }
        .pd-send-modal-header {
            padding: 1.5rem 2rem;
            border-bottom: 1px solid rgba(255,255,255,0.06);
            display: flex;
            align-items: center;
            justify-content: space-between;
            background: rgba(0,0,0,0.3);
        }
        .pd-send-modal-title {
            font-family: 'Space Grotesk', sans-serif;
            font-size: 1.3rem;
            color: var(--gold-primary);
            display: flex;
            align-items: center;
            gap: 0.75rem;
        }
        .pd-send-modal-close {
            background: transparent;
            border: none;
            color: var(--text-muted);
            cursor: pointer;
            padding: 0.5rem;
            border-radius: 8px;
            transition: all 0.2s ease;
        }
        .pd-send-modal-close:hover {
            background: rgba(255,255,255,0.05);
            color: var(--text-primary);
        }
        .pd-send-modal-body {
            flex: 1;
            overflow-y: auto;
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 0;
        }
        .pd-send-preview-pane {
            padding: 2rem;
            border-right: 1px solid rgba(255,255,255,0.06);
            background: rgba(0,0,0,0.2);
            overflow-y: auto;
            max-height: 60vh;
        }
        .pd-send-preview-label {
            font-size: 0.65rem;
            color: var(--gold-primary);
            letter-spacing: 0.12em;
            text-transform: uppercase;
            margin-bottom: 1rem;
            display: flex;
            align-items: center;
            gap: 0.5rem;
        }
        .pd-send-preview-label::before {
            content: '\1F441';
        }
        .pd-send-preview-card {
            background: linear-gradient(180deg, #0d0d14 0%, #08080c 100%);
            border: 1px solid rgba(212,168,83,0.15);
            border-radius: 16px;
            padding: 1.5rem;
            font-family: 'Inter', sans-serif;
        }
        .pd-send-preview-org {
            font-size: 0.7rem;
            color: var(--gold-primary);
            letter-spacing: 0.1em;
            margin-bottom: 0.5rem;
        }
        .pd-send-preview-title {
            font-size: 1.3rem;
            color: var(--text-primary);
            margin-bottom: 1rem;
            line-height: 1.3;
        }
        .pd-send-preview-sections {
            display: flex;
            flex-direction: column;
            gap: 0.75rem;
        }
        .pd-send-preview-section {
            display: flex;
            align-items: center;
            gap: 0.75rem;
            padding: 0.6rem 0;
            border-bottom: 1px solid rgba(255,255,255,0.04);
            font-size: 0.9rem;
            color: var(--text-secondary);
        }
        .pd-send-preview-section:last-child {
            border-bottom: none;
        }
        .pd-send-preview-section-icon {
            width: 28px;
            height: 28px;
            border-radius: 6px;
            background: rgba(212,168,83,0.1);
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 0.85rem;
        }
        .pd-send-config-pane {
            padding: 2rem;
            display: flex;
            flex-direction: column;
            gap: 1.5rem;
        }
        .pd-send-config-section {
            display: flex;
            flex-direction: column;
            gap: 0.75rem;
        }
        .pd-send-config-label {
            font-size: 0.65rem;
            color: var(--text-muted);
            letter-spacing: 0.1em;
            text-transform: uppercase;
        }
        .pd-send-recipient {
            background: rgba(34,197,94,0.08);
            border: 1px solid rgba(34,197,94,0.2);
            border-radius: 12px;
            padding: 1rem 1.25rem;
            display: flex;
            align-items: center;
            gap: 1rem;
        }
        .pd-send-recipient-icon {
            width: 40px;
            height: 40px;
            border-radius: 10px;
            background: rgba(34,197,94,0.15);
            display: flex;
            align-items: center;
            justify-content: center;
            color: #4ade80;
            font-size: 1.2rem;
        }
        .pd-send-recipient-info {
            flex: 1;
        }
        .pd-send-recipient-name {
            font-size: 1rem;
            color: var(--text-primary);
            font-weight: 500;
        }
        .pd-send-recipient-email {
            font-size: 0.8rem;
            color: var(--text-muted);
            margin-top: 0.2rem;
        }
        
        /* Send Modal - Organization & Contacts */
        .pd-send-org-info {
            background: rgba(212,168,83,0.06);
            border: 1px solid rgba(212,168,83,0.15);
            border-radius: 12px;
            padding: 1rem 1.25rem;
            display: flex;
            align-items: center;
            gap: 1rem;
        }
        .pd-send-org-icon {
            width: 44px;
            height: 44px;
            border-radius: 10px;
            background: rgba(212,168,83,0.15);
            display: flex;
            align-items: center;
            justify-content: center;
            color: var(--gold-primary);
            font-size: 1.3rem;
        }
        .pd-send-org-name {
            font-size: 1.05rem;
            color: var(--text-primary);
            font-weight: 500;
        }
        .pd-send-org-type {
            font-size: 0.75rem;
            color: var(--text-muted);
            margin-top: 0.2rem;
        }
        .pd-send-contacts-list {
            max-height: 180px;
            overflow-y: auto;
            display: flex;
            flex-direction: column;
            gap: 0.5rem;
        }
        .pd-send-contact-item {
            display: flex;
            align-items: center;
            gap: 0.75rem;
            padding: 0.6rem 0.85rem;
            background: rgba(255,255,255,0.02);
            border: 1px solid rgba(255,255,255,0.06);
            border-radius: 8px;
            cursor: pointer;
            transition: all 0.15s ease;
        }
        .pd-send-contact-item:hover {
            background: rgba(255,255,255,0.04);
            border-color: rgba(255,255,255,0.1);
        }
        .pd-send-contact-item.selected {
            background: rgba(34,197,94,0.08);
            border-color: rgba(34,197,94,0.25);
        }
        .pd-send-contact-item input[type="checkbox"] {
            width: 16px;
            height: 16px;
            accent-color: #4ade80;
        }
        .pd-send-contact-info {
            flex: 1;
            min-width: 0;
        }
        .pd-send-contact-name {
            font-size: 0.85rem;
            color: var(--text-primary);
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
        }
        .pd-send-contact-email {
            font-size: 0.7rem;
            color: var(--text-muted);
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
        }
        .pd-send-contact-role {
            font-size: 0.65rem;
            color: var(--gold-primary);
            background: rgba(212,168,83,0.1);
            padding: 0.15rem 0.5rem;
            border-radius: 4px;
        }
        .pd-send-contact-count {
            font-size: 0.7rem;
            color: #4ade80;
            background: rgba(34,197,94,0.15);
            padding: 0.2rem 0.5rem;
            border-radius: 4px;
        }
        .pd-send-scan-btn {
            font-size: 0.7rem;
            color: var(--gold-primary);
            background: rgba(212,168,83,0.1);
            border: 1px solid rgba(212,168,83,0.25);
            padding: 0.2rem 0.5rem;
            border-radius: 4px;
            cursor: pointer;
            display: inline-flex;
            align-items: center;
            gap: 3px;
            transition: all 0.2s;
        }
        .pd-send-scan-btn:hover {
            background: rgba(212,168,83,0.2);
            border-color: rgba(212,168,83,0.4);
        }
        .pd-send-scan-btn:disabled {
            opacity: 0.5;
            cursor: not-allowed;
        }
        .pd-send-inline-form {
            background: rgba(212,168,83,0.05);
            border: 1px dashed rgba(212,168,83,0.3);
            border-radius: 8px;
            padding: 0.75rem;
            margin-bottom: 0.5rem;
        }
        .pd-send-inline-form input {
            width: 100%;
            background: rgba(255,255,255,0.06);
            border: 1px solid rgba(255,255,255,0.12);
            color: var(--text-primary);
            padding: 0.4rem 0.6rem;
            border-radius: 4px;
            font-size: 0.82rem;
            margin-bottom: 0.4rem;
        }
        .pd-send-inline-form input:focus {
            outline: none;
            border-color: rgba(212,168,83,0.4);
        }
        .pd-send-discovered-badge {
            font-size: 0.65rem;
            color: #60a5fa;
            background: rgba(59,130,246,0.12);
            padding: 0.1rem 0.4rem;
            border-radius: 3px;
            margin-left: 0.3rem;
        }
        .pd-send-config-label {
            display: flex;
            justify-content: space-between;
            align-items: center;
        }
        .pd-send-no-contacts {
            text-align: center;
            padding: 1.5rem;
            color: var(--text-muted);
            font-size: 0.85rem;
            font-style: italic;
        }
        .pd-send-fullpreview-btn {
            width: 100%;
            margin-top: 1rem;
            background: rgba(59,130,246,0.1);
            border: 1px solid rgba(59,130,246,0.25);
            color: #60a5fa;
            padding: 0.65rem 1rem;
            border-radius: 8px;
            font-size: 0.8rem;
            cursor: pointer;
            font-family: inherit;
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 0.5rem;
            transition: all 0.2s ease;
        }
        .pd-send-fullpreview-btn:hover {
            background: rgba(59,130,246,0.15);
        }
        
        .pd-send-options {
            display: flex;
            flex-direction: column;
            gap: 0.75rem;
        }
        .pd-send-option {
            display: flex;
            align-items: center;
            gap: 0.75rem;
            padding: 0.5rem 0;
            cursor: pointer;
        }
        .pd-send-option input[type="checkbox"] {
            width: 18px;
            height: 18px;
            accent-color: var(--gold-primary);
        }
        .pd-send-option span {
            font-size: 0.9rem;
            color: var(--text-secondary);
        }
        .pd-send-message-field textarea {
            width: 100%;
            background: rgba(0,0,0,0.3);
            border: 1px solid rgba(255,255,255,0.1);
            border-radius: 10px;
            padding: 1rem;
            color: var(--text-primary);
            font-size: 0.9rem;
            min-height: 80px;
            resize: vertical;
            font-family: inherit;
        }
        .pd-send-message-field textarea:focus {
            outline: none;
            border-color: rgba(212,168,83,0.3);
        }
        .pd-send-modal-footer {
            padding: 1.25rem 2rem;
            border-top: 1px solid rgba(255,255,255,0.06);
            display: flex;
            align-items: center;
            justify-content: space-between;
            background: rgba(0,0,0,0.3);
        }
        .pd-send-template-actions {
            display: flex;
            gap: 0.75rem;
        }
        .pd-send-template-btn {
            background: rgba(255,255,255,0.05);
            border: 1px solid rgba(255,255,255,0.1);
            color: var(--text-secondary);
            padding: 0.6rem 1rem;
            border-radius: 8px;
            font-size: 0.8rem;
            cursor: pointer;
            display: flex;
            align-items: center;
            gap: 0.4rem;
            transition: all 0.2s ease;
        }
        .pd-send-template-btn:hover {
            background: rgba(255,255,255,0.08);
            color: var(--text-primary);
        }
        .pd-send-actions {
            display: flex;
            gap: 0.75rem;
        }
        .pd-send-btn {
            padding: 0.75rem 1.5rem;
            border-radius: 10px;
            font-size: 0.9rem;
            font-weight: 500;
            cursor: pointer;
            display: flex;
            align-items: center;
            gap: 0.5rem;
            transition: all 0.2s ease;
        }
        .pd-send-btn.secondary {
            background: rgba(255,255,255,0.05);
            border: 1px solid rgba(255,255,255,0.15);
            color: var(--text-secondary);
        }
        .pd-send-btn.secondary:hover {
            background: rgba(255,255,255,0.1);
            color: var(--text-primary);
        }
        .pd-send-btn.primary {
            background: linear-gradient(135deg, var(--gold-primary), #c49a45);
            border: none;
            color: #0a0a0b;
            font-weight: 600;
        }
        .pd-send-btn.primary:hover {
            transform: translateY(-1px);
            box-shadow: 0 4px 20px rgba(212,168,83,0.3);
        }
        .pd-send-btn.primary:disabled {
            opacity: 0.5;
            cursor: not-allowed;
            transform: none;
        }
        
        /* Wizard Send Modal */
        .wz-send-modal {
            position: fixed;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background: rgba(0,0,0,0.9);
            backdrop-filter: blur(12px);
            display: none;
            align-items: center;
            justify-content: center;
            z-index: 10002;
            padding: 2rem;
        }
        .wz-send-modal.active { display: flex; }
        
        /* ===== PROPOSAL TEMPLATE DESIGNER v2 ===== */
        .ptd-container {
            display: grid;
            grid-template-columns: 340px 1fr 320px;
            flex: 1;
            overflow: hidden;
        }
        .ptd-sections-panel {
            background: rgba(12, 12, 18, 0.98);
            border-right: 1px solid var(--border-subtle);
            display: flex;
            flex-direction: column;
            overflow: hidden;
        }
        .ptd-panel-header {
            padding: 1rem 1.25rem;
            border-bottom: 1px solid var(--border-subtle);
            background: rgba(0,0,0,0.3);
        }
        .ptd-panel-title {
            font-family: 'Space Grotesk', sans-serif;
            font-size: 0.95rem;
            color: var(--gold-primary);
            display: flex;
            align-items: center;
            gap: 0.5rem;
        }
        .ptd-panel-subtitle {
            font-size: 0.75rem;
            color: var(--text-muted);
            margin-top: 0.25rem;
        }
        .ptd-template-selector {
            padding: 0.85rem 1rem;
            border-bottom: 1px solid var(--border-subtle);
            background: rgba(212, 168, 85, 0.03);
        }
        .ptd-template-row {
            display: flex;
            gap: 0.5rem;
            margin-bottom: 0.6rem;
        }
        .ptd-template-dropdown {
            flex: 1;
            padding: 0.55rem 0.75rem;
            background: var(--bg-card);
            border: 1px solid var(--border-subtle);
            border-radius: 6px;
            color: var(--text-primary);
            font-size: 0.8rem;
        }
        .ptd-template-btn {
            padding: 0.5rem 0.75rem;
            background: transparent;
            border: 1px solid var(--border-subtle);
            color: var(--text-secondary);
            border-radius: 6px;
            font-size: 0.7rem;
            cursor: pointer;
            display: flex;
            align-items: center;
            gap: 0.3rem;
            transition: all 0.2s;
        }
        .ptd-template-btn:hover { border-color: var(--gold-primary); color: var(--gold-primary); }
        .ptd-template-btn.primary { background: var(--gold-primary); border-color: var(--gold-primary); color: #0a0a0f; }
        .ptd-template-btn.primary:hover { background: var(--gold-secondary); }
        .ptd-org-selector {
            padding: 0.6rem 0.85rem;
            background: rgba(59, 130, 246, 0.08);
            border: 1px solid rgba(59, 130, 246, 0.2);
            border-radius: 8px;
            cursor: pointer;
            transition: all 0.2s;
        }
        .ptd-org-selector:hover { border-color: rgba(59, 130, 246, 0.4); }
        .ptd-org-selector-label { font-size: 0.65rem; color: #60a5fa; text-transform: uppercase; letter-spacing: 0.05em; }
        .ptd-org-selector-value { font-size: 0.85rem; color: var(--text-primary); margin-top: 0.15rem; }
        .ptd-sections-list {
            flex: 1;
            overflow-y: auto;
            padding: 0.6rem;
        }
        .ptd-section-item {
            background: var(--bg-card);
            border: 1px solid var(--border-subtle);
            border-radius: 8px;
            padding: 0.75rem 0.85rem;
            margin-bottom: 0.5rem;
            cursor: pointer;
            transition: all 0.15s;
            display: flex;
            align-items: flex-start;
            gap: 0.6rem;
        }
        .ptd-section-item:hover { border-color: rgba(212, 168, 85, 0.25); background: rgba(212, 168, 85, 0.03); }
        .ptd-section-item.active { border-color: var(--gold-primary); box-shadow: 0 0 0 1px var(--gold-primary), 0 4px 12px rgba(212, 168, 85, 0.1); }
        .ptd-section-drag { color: var(--text-muted); cursor: grab; padding: 0.15rem; opacity: 0.4; }
        .ptd-section-item:hover .ptd-section-drag { opacity: 0.8; }
        .ptd-section-num {
            width: 20px; height: 20px;
            background: var(--gold-primary);
            color: #0a0a0f;
            border-radius: 50%;
            font-size: 0.65rem;
            font-weight: 600;
            display: flex;
            align-items: center;
            justify-content: center;
            flex-shrink: 0;
        }
        .ptd-section-content { flex: 1; min-width: 0; }
        .ptd-section-title { font-size: 0.85rem; font-weight: 500; color: var(--text-primary); margin-bottom: 0.3rem; }
        .ptd-section-tags { display: flex; gap: 0.35rem; flex-wrap: wrap; }
        .ptd-tag {
            font-size: 0.6rem;
            padding: 0.12rem 0.4rem;
            border-radius: 4px;
            background: rgba(255,255,255,0.05);
            color: var(--text-muted);
        }
        .ptd-tag.content { background: rgba(34, 197, 94, 0.12); color: #4ade80; }
        .ptd-tag.research { background: rgba(59, 130, 246, 0.12); color: #60a5fa; }
        .ptd-tag.media { background: rgba(168, 85, 247, 0.12); color: #c084fc; }
        .ptd-tag.instructions { background: rgba(251, 191, 36, 0.12); color: #fbbf24; }
        .ptd-add-section {
            margin: 0.4rem 0.6rem 0.75rem;
            padding: 0.65rem;
            background: transparent;
            border: 2px dashed var(--border-subtle);
            border-radius: 8px;
            color: var(--text-muted);
            font-size: 0.8rem;
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 0.4rem;
        }
        .ptd-add-section:hover { border-color: var(--gold-primary); color: var(--gold-primary); }
        
        /* Editor Panel */
        .ptd-editor-panel { display: flex; flex-direction: column; overflow: hidden; background: var(--bg-deep); }
        .ptd-editor-header {
            padding: 0.85rem 1.25rem;
            border-bottom: 1px solid var(--border-subtle);
            background: rgba(0,0,0,0.25);
            display: flex;
            justify-content: space-between;
            align-items: center;
        }
        .ptd-editor-title-input {
            background: transparent;
            border: none;
            font-family: 'Space Grotesk', sans-serif;
            font-size: 1.15rem;
            color: var(--text-primary);
            flex: 1;
            padding: 0.2rem 0;
        }
        .ptd-editor-title-input:focus { outline: none; border-bottom: 1px solid var(--gold-primary); }
        .ptd-editor-tabs {
            display: flex;
            border-bottom: 1px solid var(--border-subtle);
            padding: 0 1.25rem;
            background: rgba(0,0,0,0.15);
        }
        .ptd-editor-tab {
            padding: 0.7rem 1rem;
            font-size: 0.8rem;
            color: var(--text-muted);
            cursor: pointer;
            border-bottom: 2px solid transparent;
            transition: all 0.15s;
        }
        .ptd-editor-tab:hover { color: var(--text-primary); }
        .ptd-editor-tab.active { color: var(--gold-primary); border-bottom-color: var(--gold-primary); }
        .ptd-editor-body { flex: 1; overflow-y: auto; padding: 1.25rem; }
        .ptd-editor-section { margin-bottom: 1.25rem; }
        .ptd-editor-label {
            font-size: 0.7rem;
            text-transform: uppercase;
            letter-spacing: 0.08em;
            color: var(--text-muted);
            margin-bottom: 0.5rem;
            display: flex;
            align-items: center;
            gap: 0.4rem;
        }
        .ptd-editor-label svg { width: 14px; height: 14px; }
        .ptd-editor-textarea {
            width: 100%;
            min-height: 160px;
            padding: 0.85rem;
            background: var(--bg-card);
            border: 1px solid var(--border-subtle);
            border-radius: 8px;
            color: var(--text-primary);
            font-size: 0.85rem;
            line-height: 1.6;
            resize: vertical;
            font-family: inherit;
        }
        .ptd-editor-textarea:focus { outline: none; border-color: var(--gold-primary); }
        .ptd-editor-textarea.instructions { min-height: 100px; background: rgba(59, 130, 246, 0.04); border-color: rgba(59, 130, 246, 0.15); }
        .ptd-ai-buttons { display: flex; gap: 0.5rem; margin-top: 0.6rem; }
        .ptd-research-topic {
            background: var(--bg-card);
            border: 1px solid var(--border-subtle);
            border-radius: 8px;
            padding: 0.75rem;
            margin-bottom: 0.5rem;
        }
        .ptd-research-topic-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 0.5rem; }
        .ptd-research-topic input {
            flex: 1;
            background: transparent;
            border: none;
            color: var(--text-primary);
            font-size: 0.85rem;
            font-weight: 500;
        }
        .ptd-research-topic input:focus { outline: none; }
        .ptd-context-conn {
            background: rgba(212, 168, 85, 0.05);
            border: 1px solid rgba(212, 168, 85, 0.15);
            border-radius: 6px;
            padding: 0.6rem;
        }
        .ptd-context-conn label { font-size: 0.6rem; color: var(--gold-primary); text-transform: uppercase; display: block; margin-bottom: 0.2rem; }
        .ptd-context-conn input { width: 100%; background: transparent; border: none; color: var(--text-secondary); font-size: 0.8rem; }
        .ptd-media-options { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.6rem; }
        .ptd-media-option {
            background: var(--bg-card);
            border: 2px solid var(--border-subtle);
            border-radius: 10px;
            padding: 1rem;
            text-align: center;
            cursor: pointer;
            transition: all 0.15s;
        }
        .ptd-media-option:hover { border-color: rgba(168, 85, 247, 0.3); }
        .ptd-media-option.active { border-color: #a855f7; background: rgba(168, 85, 247, 0.08); }
        .ptd-media-option svg { width: 24px; height: 24px; color: var(--text-muted); margin-bottom: 0.4rem; }
        .ptd-media-option.active svg { color: #a855f7; }
        .ptd-empty-state {
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            height: 100%;
            padding: 2rem;
            text-align: center;
            color: var(--text-muted);
        }
        .ptd-empty-state svg { width: 48px; height: 48px; opacity: 0.3; margin-bottom: 1rem; }
        .ptd-empty-state p { font-size: 0.85rem; max-width: 280px; }
        
        /* Agent Panel */
        .ptd-agent-panel {
            background: rgba(12, 12, 18, 0.98);
            border-left: 1px solid var(--border-subtle);
            display: flex;
            flex-direction: column;
            overflow: hidden;
        }
        .ptd-agent-header {
            padding: 1rem;
            border-bottom: 1px solid var(--border-subtle);
            background: linear-gradient(135deg, rgba(212, 168, 85, 0.08) 0%, rgba(212, 168, 85, 0.02) 100%);
        }
        .ptd-agent-title {
            font-family: 'Space Grotesk', sans-serif;
            font-size: 0.9rem;
            color: var(--gold-primary);
            display: flex;
            align-items: center;
            gap: 0.4rem;
        }
        .ptd-agent-status {
            font-size: 0.7rem;
            color: var(--text-muted);
            margin-top: 0.2rem;
            display: flex;
            align-items: center;
            gap: 0.3rem;
        }
        .ptd-agent-dot { width: 6px; height: 6px; background: #4ade80; border-radius: 50%; animation: ptdPulse 2s infinite; }
        @keyframes ptdPulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.4; } }
        .ptd-quick-actions {
            padding: 0.6rem 0.75rem;
            border-bottom: 1px solid var(--border-subtle);
            display: flex;
            flex-wrap: wrap;
            gap: 0.35rem;
        }
        .ptd-quick-btn {
            padding: 0.3rem 0.6rem;
            background: rgba(255,255,255,0.03);
            border: 1px solid var(--border-subtle);
            border-radius: 12px;
            color: var(--text-secondary);
            font-size: 0.65rem;
            cursor: pointer;
            transition: all 0.15s;
        }
        .ptd-quick-btn:hover { border-color: var(--gold-primary); color: var(--gold-primary); }
        .ptd-agent-chat { flex: 1; overflow-y: auto; padding: 0.75rem; }
        .ptd-msg { margin-bottom: 0.65rem; display: flex; gap: 0.5rem; }
        .ptd-msg.user { flex-direction: row-reverse; }
        .ptd-msg-avatar {
            width: 26px; height: 26px;
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 0.65rem;
            font-weight: 600;
            flex-shrink: 0;
        }
        .ptd-msg.assistant .ptd-msg-avatar { background: linear-gradient(135deg, var(--gold-primary), var(--gold-secondary)); color: #0a0a0f; }
        .ptd-msg.user .ptd-msg-avatar { background: rgba(59, 130, 246, 0.2); color: #60a5fa; }
        .ptd-msg-bubble {
            max-width: 85%;
            padding: 0.6rem 0.8rem;
            border-radius: 10px;
            font-size: 0.8rem;
            line-height: 1.5;
        }
        .ptd-msg.assistant .ptd-msg-bubble { background: var(--bg-card); border: 1px solid var(--border-subtle); }
        .ptd-msg.user .ptd-msg-bubble { background: rgba(59, 130, 246, 0.12); border: 1px solid rgba(59, 130, 246, 0.25); }
        .ptd-agent-input-area { padding: 0.75rem; border-top: 1px solid var(--border-subtle); background: rgba(0,0,0,0.2); }
        .ptd-agent-input-row { display: flex; gap: 0.4rem; }
        .ptd-agent-input {
            flex: 1;
            padding: 0.55rem 0.75rem;
            background: var(--bg-card);
            border: 1px solid var(--border-subtle);
            border-radius: 8px;
            color: var(--text-primary);
            font-size: 0.8rem;
            resize: none;
            font-family: inherit;
        }
        .ptd-agent-input:focus { outline: none; border-color: var(--gold-primary); }
        .ptd-agent-send {
            width: 36px; height: 36px;
            background: var(--gold-primary);
            border: none;
            border-radius: 8px;
            color: #0a0a0f;
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
        }
        .ptd-agent-send:hover { background: var(--gold-secondary); }
        .ptd-context-toggle {
            padding: 0.55rem 0.75rem;
            border-top: 1px solid var(--border-subtle);
            cursor: pointer;
            font-size: 0.7rem;
            color: var(--text-muted);
            display: flex;
            justify-content: space-between;
            align-items: center;
            background: rgba(0,0,0,0.1);
        }
        .ptd-context-toggle:hover { color: var(--text-secondary); }
        .ptd-context-panel {
            max-height: 0;
            overflow: hidden;
            transition: max-height 0.25s ease;
            background: rgba(0,0,0,0.2);
        }
        .ptd-context-panel.expanded { max-height: 220px; overflow-y: auto; }
        .ptd-context-item { padding: 0.5rem 0.75rem; border-bottom: 1px solid rgba(255,255,255,0.03); }
        .ptd-context-item-label { font-size: 0.6rem; color: var(--gold-primary); text-transform: uppercase; }
        .ptd-context-item-value { font-size: 0.75rem; color: var(--text-secondary); margin-top: 0.15rem; line-height: 1.4; }

        /* ===== UNIFIED PARTNER SELECTOR ===== */
        .org-selector-modal {
            position: fixed;
            top: 0; left: 0; right: 0; bottom: 0;
            background: rgba(0,0,0,0.85);
            backdrop-filter: blur(8px);
            z-index: 10010;
            display: none;
            align-items: center;
            justify-content: center;
            padding: 2rem;
        }
        .org-selector-modal.active { display: flex; }
        
        .org-selector-content {
            background: linear-gradient(145deg, #12121a 0%, #0a0a0f 100%);
            border: 1px solid rgba(255,255,255,0.08);
            border-radius: 16px;
            width: 100%;
            max-width: 1100px;
            height: 88vh;
            max-height: 850px;
            display: flex;
            flex-direction: column;
            overflow: hidden;
            box-shadow: 0 25px 80px rgba(0,0,0,0.6);
        }
        
        .ps-header {
            padding: 1.25rem 1.5rem;
            border-bottom: 1px solid rgba(255,255,255,0.06);
            display: flex;
            justify-content: space-between;
            align-items: center;
            background: rgba(0,0,0,0.3);
        }
        .ps-header-left {
            display: flex;
            align-items: center;
            gap: 1rem;
        }
        .ps-header-title {
            font-family: 'Space Grotesk', sans-serif;
            font-size: 1.1rem;
            color: var(--text-primary);
            display: flex;
            align-items: center;
            gap: 0.6rem;
        }
        .ps-header-title svg { color: var(--gold-primary); }
        .ps-mode-badge {
            background: rgba(59,130,246,0.15);
            border: 1px solid rgba(59,130,246,0.3);
            color: #60a5fa;
            padding: 0.3rem 0.75rem;
            border-radius: 20px;
            font-size: 0.7rem;
            text-transform: uppercase;
            letter-spacing: 0.08em;
        }
        .ps-mode-badge.multi {
            background: rgba(168,85,247,0.15);
            border-color: rgba(168,85,247,0.3);
            color: #c084fc;
        }
        .ps-header-actions {
            display: flex;
            gap: 0.5rem;
            align-items: center;
        }
        .ps-close-btn {
            background: transparent;
            border: none;
            color: var(--text-muted);
            cursor: pointer;
            padding: 0.5rem;
            border-radius: 6px;
            transition: all 0.15s ease;
        }
        .ps-close-btn:hover { background: rgba(255,255,255,0.05); color: var(--text-primary); }
        
        .ps-body {
            flex: 1;
            display: flex;
            overflow: hidden;
        }
        
        /* Filters Sidebar */
        .ps-filters {
            width: 260px;
            border-right: 1px solid rgba(255,255,255,0.06);
            background: rgba(0,0,0,0.2);
            display: flex;
            flex-direction: column;
            overflow: hidden;
        }
        .ps-filters-header {
            padding: 1rem;
            border-bottom: 1px solid rgba(255,255,255,0.06);
            display: flex;
            justify-content: space-between;
            align-items: center;
        }
        .ps-filters-title {
            font-size: 0.7rem;
            text-transform: uppercase;
            letter-spacing: 0.12em;
            color: var(--text-muted);
        }
        .ps-filters-clear {
            font-size: 0.7rem;
            color: #60a5fa;
            cursor: pointer;
            background: none;
            border: none;
            padding: 0;
        }
        .ps-filters-clear:hover { text-decoration: underline; }
        .ps-filters-scroll {
            flex: 1;
            overflow-y: auto;
            padding: 0.75rem;
        }
        .ps-filter-section {
            margin-bottom: 1.25rem;
        }
        .ps-filter-label {
            font-size: 0.65rem;
            text-transform: uppercase;
            letter-spacing: 0.1em;
            color: var(--text-muted);
            margin-bottom: 0.6rem;
            display: flex;
            align-items: center;
            gap: 0.4rem;
        }
        .ps-filter-chips {
            display: flex;
            flex-wrap: wrap;
            gap: 0.4rem;
        }
        .ps-filter-chip {
            background: rgba(255,255,255,0.03);
            border: 1px solid rgba(255,255,255,0.08);
            border-radius: 16px;
            padding: 0.35rem 0.7rem;
            font-size: 0.7rem;
            color: var(--text-secondary);
            cursor: pointer;
            transition: all 0.2s ease;
            display: flex;
            align-items: center;
            gap: 0.3rem;
        }
        .ps-filter-chip:hover { border-color: rgba(59,130,246,0.4); background: rgba(59,130,246,0.05); }
        .ps-filter-chip.active {
            background: rgba(59,130,246,0.15);
            border-color: rgba(59,130,246,0.4);
            color: #60a5fa;
        }
        .ps-filter-chip[style*="--ps-chip-color"].active {
            background: color-mix(in srgb, var(--ps-chip-color) 15%, transparent);
            border-color: color-mix(in srgb, var(--ps-chip-color) 40%, transparent);
            color: var(--ps-chip-color);
        }
        .ps-gov-parent { font-weight: 600; }
        .ps-gov-expand {
            cursor: pointer;
            font-size: 0.75rem;
            color: var(--text-muted);
            padding: 0.15rem 0.3rem;
            user-select: none;
        }
        .ps-gov-expand:hover { color: var(--text-primary); }
        .ps-gov-sub { font-size: 0.65rem; padding: 0.25rem 0.55rem; }
        .ps-research-slider {
            margin-top: 0.5rem;
        }
        .ps-research-slider input[type="range"] {
            width: 100%;
            height: 4px;
            -webkit-appearance: none;
            background: rgba(255,255,255,0.1);
            border-radius: 2px;
            outline: none;
        }
        .ps-research-slider input[type="range"]::-webkit-slider-thumb {
            -webkit-appearance: none;
            width: 14px;
            height: 14px;
            background: var(--gold-primary);
            border-radius: 50%;
            cursor: pointer;
        }
        .ps-research-value {
            display: flex;
            justify-content: space-between;
            font-size: 0.7rem;
            color: var(--text-muted);
            margin-top: 0.5rem;
        }
        .ps-quick-filters {
            padding: 0.75rem;
            border-top: 1px solid rgba(255,255,255,0.06);
            background: rgba(0,0,0,0.15);
        }
        .ps-quick-filter-label {
            font-size: 0.65rem;
            text-transform: uppercase;
            letter-spacing: 0.1em;
            color: var(--text-muted);
            margin-bottom: 0.5rem;
        }
        .ps-quick-filter-btn {
            display: block;
            width: 100%;
            background: rgba(107,114,128,0.08);
            border: 1px solid rgba(107,114,128,0.2);
            color: #9ca3af;
            padding: 0.5rem 0.75rem;
            border-radius: 8px;
            font-size: 0.72rem;
            cursor: pointer;
            text-align: left;
            margin-bottom: 0.4rem;
            transition: all 0.2s ease;
        }
        .ps-quick-filter-btn:hover { background: rgba(107,114,128,0.15); }
        .ps-quick-filter-btn.ready-to-reach {
            background: rgba(59,130,246,0.08);
            border-color: rgba(59,130,246,0.2);
            color: #3b82f6;
        }
        .ps-quick-filter-btn.ready-to-reach:hover { background: rgba(59,130,246,0.15); }
        .ps-quick-filter-btn.warm-leads {
            background: rgba(239,68,68,0.08);
            border-color: rgba(239,68,68,0.2);
            color: #ef4444;
        }
        .ps-quick-filter-btn.warm-leads:hover { background: rgba(239,68,68,0.15); }
        .ps-quick-filter-btn.stale {
            background: rgba(251,191,36,0.08);
            border-color: rgba(251,191,36,0.2);
            color: #fbbf24;
        }
        .ps-quick-filter-btn.stale:hover { background: rgba(251,191,36,0.15); }
        .ps-quick-filter-btn.high-priority {
            background: rgba(168,85,247,0.08);
            border-color: rgba(168,85,247,0.2);
            color: #a855f7;
        }
        .ps-quick-filter-btn.high-priority:hover { background: rgba(168,85,247,0.15); }
        .ps-quick-filter-btn.uncontacted {
            background: rgba(107,114,128,0.08);
            border-color: rgba(107,114,128,0.2);
            color: #9ca3af;
        }
        .ps-quick-filter-btn.uncontacted:hover { background: rgba(107,114,128,0.15); }
        .ps-qf-count { font-size: 0.62rem; opacity: 0.7; margin-left: 0.2rem; }
        
        /* Partner List */
        .ps-list {
            flex: 1;
            display: flex;
            flex-direction: column;
            overflow: hidden;
        }
        .ps-list-header {
            padding: 1rem 1.25rem;
            border-bottom: 1px solid rgba(255,255,255,0.06);
            display: flex;
            justify-content: space-between;
            align-items: center;
            gap: 1rem;
        }
        .ps-search {
            flex: 1;
            display: flex;
            align-items: center;
            gap: 0.75rem;
            background: rgba(0,0,0,0.3);
            border: 1px solid rgba(255,255,255,0.08);
            border-radius: 10px;
            padding: 0.6rem 1rem;
        }
        .ps-search svg { color: var(--text-muted); flex-shrink: 0; }
        .ps-search input {
            flex: 1;
            background: transparent;
            border: none;
            color: var(--text-primary);
            font-size: 0.9rem;
            outline: none;
        }
        .ps-search input::placeholder { color: var(--text-muted); }
        .ps-list-actions {
            display: flex;
            gap: 0.5rem;
        }
        .ps-list-action-btn {
            background: rgba(255,255,255,0.03);
            border: 1px solid rgba(255,255,255,0.1);
            color: var(--text-secondary);
            padding: 0.5rem 0.75rem;
            border-radius: 6px;
            font-size: 0.75rem;
            cursor: pointer;
            transition: all 0.2s ease;
        }
        .ps-list-action-btn:hover { background: rgba(255,255,255,0.06); color: var(--text-primary); }
        .ps-list-action-btn.primary {
            background: rgba(59,130,246,0.15);
            border-color: rgba(59,130,246,0.3);
            color: #60a5fa;
        }
        .ps-list-action-btn.primary:hover { background: rgba(59,130,246,0.25); }
        
        /* NL Search Feedback */
        .ps-nl-feedback {
            padding: 0.4rem 1.25rem;
            background: rgba(59,130,246,0.08);
            color: #60a5fa;
            font-size: 0.72rem;
            border-bottom: 1px solid rgba(59,130,246,0.15);
        }

        /* Sort Dropdown */
        .ps-sort-select {
            background: rgba(0,0,0,0.3);
            border: 1px solid rgba(255,255,255,0.1);
            border-radius: 6px;
            padding: 0.4rem 0.6rem;
            color: var(--text-secondary);
            font-size: 0.72rem;
            cursor: pointer;
            outline: none;
            font-family: inherit;
        }
        .ps-sort-select:hover { border-color: rgba(255,255,255,0.2); }
        .ps-sort-select option { background: #1a1a2e; color: var(--text-primary); }

        .ps-list-stats {
            padding: 0.5rem 1.25rem;
            background: rgba(0,0,0,0.15);
            border-bottom: 1px solid rgba(255,255,255,0.04);
            display: flex;
            justify-content: space-between;
            font-size: 0.75rem;
            color: var(--text-muted);
        }
        .ps-list-stats-selected { color: #60a5fa; }
        
        .ps-list-scroll {
            flex: 1;
            overflow-y: auto;
            padding: 0.75rem 1rem;
        }
        
        .ps-org-card {
            background: rgba(255,255,255,0.02);
            border: 1px solid rgba(255,255,255,0.06);
            border-radius: 10px;
            padding: 0.9rem 1rem;
            margin-bottom: 0.5rem;
            cursor: pointer;
            transition: all 0.2s ease;
            display: grid;
            grid-template-columns: auto 1fr auto auto;
            gap: 0.75rem;
            align-items: center;
        }
        .ps-org-card:hover {
            background: rgba(255,255,255,0.04);
            border-color: rgba(255,255,255,0.1);
        }
        .ps-org-card.selected {
            background: rgba(59,130,246,0.1);
            border-color: rgba(59,130,246,0.4);
        }
        .ps-org-checkbox {
            width: 18px;
            height: 18px;
            border: 2px solid rgba(255,255,255,0.2);
            border-radius: 4px;
            display: flex;
            align-items: center;
            justify-content: center;
            transition: all 0.2s ease;
        }
        .ps-org-card.selected .ps-org-checkbox {
            background: #3b82f6;
            border-color: #3b82f6;
        }
        .ps-org-checkbox svg { display: none; color: white; }
        .ps-org-card.selected .ps-org-checkbox svg { display: block; }
        
        .ps-org-info {
            min-width: 0;
        }
        .ps-org-name {
            font-size: 0.85rem;
            color: var(--text-primary);
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
            font-weight: 500;
        }
        .ps-org-subtitle {
            display: flex;
            align-items: center;
            gap: 0.4rem;
            margin-top: 0.3rem;
            flex-wrap: wrap;
        }
        .ps-org-type-badge {
            font-size: 0.58rem;
            text-transform: uppercase;
            letter-spacing: 0.04em;
            padding: 0.12rem 0.4rem;
            border-radius: 6px;
            border: 1px solid;
            white-space: nowrap;
            font-weight: 500;
        }
        .ps-org-state {
            font-size: 0.65rem;
            color: var(--text-muted);
            font-weight: 600;
        }
        .ps-org-email {
            font-size: 0.65rem;
            opacity: 0.5;
        }

        /* Metrics column (priority + research bars) */
        .ps-org-metrics {
            display: flex;
            flex-direction: column;
            gap: 0.35rem;
            min-width: 80px;
        }
        .ps-metric {
            display: flex;
            align-items: center;
            gap: 0.4rem;
        }
        .ps-metric-bar {
            flex: 1;
            height: 3px;
            background: rgba(255,255,255,0.08);
            border-radius: 2px;
            overflow: hidden;
            min-width: 40px;
        }
        .ps-metric-fill {
            height: 100%;
            border-radius: 2px;
            transition: width 0.3s ease;
        }
        .ps-metric-val {
            font-family: 'JetBrains Mono', 'Space Grotesk', monospace;
            font-size: 0.6rem;
            font-weight: 600;
            min-width: 24px;
            text-align: right;
        }

        /* Right-side metadata (stage, value, contact) */
        .ps-org-right {
            display: flex;
            flex-direction: column;
            align-items: flex-end;
            gap: 0.25rem;
            min-width: 80px;
        }
        .ps-stage-badge {
            font-size: 0.56rem;
            padding: 0.15rem 0.4rem;
            border-radius: 6px;
            white-space: nowrap;
            font-weight: 500;
            text-transform: uppercase;
            letter-spacing: 0.04em;
        }
        .ps-org-value {
            font-size: 0.65rem;
            color: #D4A853;
            font-weight: 600;
        }
        .ps-org-contact {
            font-size: 0.6rem;
        }
        .ps-contact-never { color: var(--text-muted); }
        .ps-contact-fresh { color: #10b981; }
        .ps-contact-warm { color: #f59e0b; }
        .ps-contact-stale { color: #ef4444; }
        
        /* Selection Preview */
        .ps-selection {
            width: 280px;
            border-left: 1px solid rgba(255,255,255,0.06);
            background: linear-gradient(180deg, rgba(59,130,246,0.05) 0%, rgba(0,0,0,0.2) 100%);
            display: flex;
            flex-direction: column;
            overflow: hidden;
        }
        .ps-selection-header {
            padding: 1rem;
            border-bottom: 1px solid rgba(255,255,255,0.06);
        }
        .ps-selection-title {
            font-size: 0.7rem;
            text-transform: uppercase;
            letter-spacing: 0.12em;
            color: #60a5fa;
            display: flex;
            align-items: center;
            gap: 0.5rem;
        }
        .ps-selection-count {
            background: rgba(59,130,246,0.2);
            padding: 0.15rem 0.5rem;
            border-radius: 10px;
            font-size: 0.65rem;
        }
        .ps-selection-scroll {
            flex: 1;
            overflow-y: auto;
            padding: 0.75rem;
        }
        .ps-selection-empty {
            text-align: center;
            padding: 2rem 1rem;
            color: var(--text-muted);
            font-size: 0.8rem;
        }
        .ps-selection-item {
            background: rgba(0,0,0,0.2);
            border: 1px solid rgba(255,255,255,0.06);
            border-radius: 8px;
            padding: 0.6rem 0.75rem;
            margin-bottom: 0.4rem;
            display: flex;
            justify-content: space-between;
            align-items: center;
        }
        .ps-selection-item-dot {
            width: 6px;
            height: 6px;
            border-radius: 50%;
            flex-shrink: 0;
        }
        .ps-selection-item-name {
            font-size: 0.78rem;
            color: var(--text-primary);
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
            flex: 1;
        }
        .ps-selection-item-remove {
            background: transparent;
            border: none;
            color: var(--text-muted);
            cursor: pointer;
            padding: 0.2rem;
            font-size: 1rem;
            line-height: 1;
        }
        .ps-selection-item-remove:hover { color: #ef4444; }
        
        .ps-selection-stats {
            padding: 0.75rem;
            background: rgba(0,0,0,0.2);
            border-top: 1px solid rgba(255,255,255,0.06);
        }
        .ps-selection-stat {
            display: flex;
            justify-content: space-between;
            font-size: 0.7rem;
            color: var(--text-muted);
            margin-bottom: 0.3rem;
        }
        .ps-selection-stat-value { color: var(--text-primary); }
        
        .ps-footer {
            padding: 1rem 1.5rem;
            border-top: 1px solid rgba(255,255,255,0.06);
            display: flex;
            justify-content: space-between;
            align-items: center;
            background: rgba(0,0,0,0.3);
        }
        .ps-footer-info {
            font-size: 0.8rem;
            color: var(--text-muted);
        }
        .ps-footer-actions {
            display: flex;
            gap: 0.75rem;
        }
        .ps-btn {
            padding: 0.65rem 1.25rem;
            border-radius: 8px;
            font-size: 0.85rem;
            cursor: pointer;
            font-family: inherit;
            font-weight: 500;
            transition: all 0.2s ease;
        }
        .ps-btn.secondary {
            background: rgba(255,255,255,0.04);
            border: 1px solid rgba(255,255,255,0.1);
            color: var(--text-primary);
        }
        .ps-btn.secondary:hover { background: rgba(255,255,255,0.08); }
        .ps-btn.primary {
            background: linear-gradient(135deg, #3b82f6, #2563eb);
            border: none;
            color: white;
            font-weight: 600;
            box-shadow: 0 2px 12px rgba(59,130,246,0.25);
        }
        .ps-btn.primary:hover { transform: translateY(-1px); box-shadow: 0 4px 20px rgba(59,130,246,0.4); }
        .ps-btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none !important; }
        
        /* Partner Selector Button in Headers */
        .ed-org-selector-btn,
        .prd-org-selector-btn {
            background: rgba(255,255,255,0.03);
            border: 1px solid rgba(255,255,255,0.1);
            border-radius: 10px;
            padding: 0.5rem 1rem;
            color: var(--text-primary);
            font-family: 'Inter', sans-serif;
            font-size: 0.95rem;
            cursor: pointer;
            transition: all 0.2s ease;
            display: flex;
            align-items: center;
            gap: 0.6rem;
            min-width: 280px;
        }
        .ed-org-selector-btn:hover,
        .prd-org-selector-btn:hover {
            border-color: rgba(59,130,246,0.4);
            background: rgba(59,130,246,0.05);
        }
        .ed-org-selector-btn svg:first-child,
        .prd-org-selector-btn svg:first-child { color: #60a5fa; }
        .ed-org-selector-btn span,
        .prd-org-selector-btn span { flex: 1; text-align: left; }
        .ed-org-selector-btn .chevron,
        .prd-org-selector-btn .chevron { color: var(--text-muted); }
        .ed-org-selector-btn.has-selection,
        .prd-org-selector-btn.has-selection {
            border-color: rgba(59,130,246,0.4);
            background: rgba(59,130,246,0.08);
        }
        
        /* ===== EMAIL DESIGNER ===== */
        .email-designer {
            position: fixed;
            top: 0; left: 0; right: 0; bottom: 0;
            background: linear-gradient(145deg, #0a0a0f 0%, #0f0f18 50%, #0a0a12 100%);
            z-index: 10000;
            display: none;
            flex-direction: column;
        }
        .email-designer.active { display: flex; }
        
        .ed-header {
            background: linear-gradient(180deg, rgba(15,15,25,0.98) 0%, rgba(10,10,15,0.95) 100%);
            border-bottom: 1px solid rgba(59,130,246,0.2);
            padding: 0;
            display: flex;
            justify-content: space-between;
            align-items: stretch;
            height: 60px;
            box-shadow: 0 2px 20px rgba(0,0,0,0.3);
        }
        .ed-header-left {
            display: flex;
            align-items: center;
            gap: 0;
        }
        .ed-header-logo {
            display: flex;
            align-items: center;
            gap: 0.6rem;
            padding: 0 1.25rem;
            border-right: 1px solid rgba(255,255,255,0.06);
            height: 100%;
            background: rgba(59,130,246,0.05);
        }
        .ed-header-logo svg { width: 28px; height: 28px; color: #3b82f6; }
        .ed-header-logo span {
            font-size: 0.65rem;
            letter-spacing: 0.15em;
            color: var(--text-muted);
            text-transform: uppercase;
        }
        .ed-header-center {
            flex: 1;
            display: flex;
            align-items: center;
            gap: 1rem;
            padding: 0 1.5rem;
        }
        .ed-org-selector {
            background: rgba(255,255,255,0.03);
            border: 1px solid rgba(255,255,255,0.08);
            border-radius: 10px;
            padding: 0.5rem 1rem;
            color: var(--text-primary);
            font-family: 'Inter', sans-serif;
            font-size: 1rem;
            cursor: pointer;
            transition: all 0.2s ease;
            min-width: 280px;
            appearance: none;
            background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23888' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
            background-repeat: no-repeat;
            background-position: right 1rem center;
            padding-right: 2.5rem;
        }
        .ed-org-selector:hover { border-color: rgba(59,130,246,0.4); }
        .ed-org-selector:focus { outline: none; border-color: #3b82f6; box-shadow: 0 0 0 3px rgba(59,130,246,0.1); }
        .ed-type-selector {
            background: rgba(59,130,246,0.08);
            border: 1px solid rgba(59,130,246,0.2);
            border-radius: 8px;
            padding: 0.5rem 1rem;
            color: #3b82f6;
            font-size: 0.85rem;
            cursor: pointer;
            min-width: 180px;
        }
        .ed-header-actions {
            display: flex;
            gap: 0.6rem;
            padding: 0 1.25rem;
            align-items: center;
        }
        .ed-btn {
            padding: 0.6rem 1.1rem;
            border-radius: 8px;
            font-size: 0.8rem;
            cursor: pointer;
            display: flex;
            align-items: center;
            gap: 0.5rem;
            transition: all 0.2s ease;
            font-family: inherit;
            font-weight: 500;
        }
        .ed-btn svg { width: 16px; height: 16px; }
        .ed-btn.secondary {
            background: rgba(255,255,255,0.04);
            border: 1px solid rgba(255,255,255,0.1);
            color: var(--text-primary);
        }
        .ed-btn.secondary:hover { background: rgba(255,255,255,0.08); border-color: rgba(59,130,246,0.4); }
        .ed-btn.primary {
            background: linear-gradient(135deg, #3b82f6, #2563eb);
            border: none;
            color: white;
            font-weight: 600;
            box-shadow: 0 2px 12px rgba(59,130,246,0.25);
        }
        .ed-btn.primary:hover { transform: translateY(-1px); box-shadow: 0 4px 20px rgba(59,130,246,0.4); }
        .ed-btn.send {
            background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
            border: none;
            color: white;
            font-weight: 600;
            padding: 0.75rem 1.5rem;
            box-shadow: 0 4px 16px rgba(34, 197, 94, 0.35);
        }
        .ed-btn.send:hover { transform: translateY(-2px); box-shadow: 0 6px 24px rgba(34, 197, 94, 0.5); }
        .ed-close-btn {
            background: transparent;
            border: none;
            color: var(--text-muted);
            cursor: pointer;
            padding: 0.5rem;
            margin-left: 0.5rem;
            border-radius: 6px;
            transition: all 0.15s ease;
        }
        .ed-close-btn:hover { background: rgba(255,255,255,0.05); color: var(--text-primary); }
        
        .ed-body {
            flex: 1;
            display: flex;
            overflow: hidden;
        }
        
        /* Goals Panel */
        .ed-goals-panel {
            width: 320px;
            border-right: 1px solid rgba(255,255,255,0.06);
            background: linear-gradient(180deg, rgba(0,0,0,0.4) 0%, rgba(0,0,0,0.2) 100%);
            display: flex;
            flex-direction: column;
            overflow: hidden;
        }
        .ed-goals-header {
            padding: 1.25rem 1.25rem 0.75rem;
            border-bottom: 1px solid rgba(255,255,255,0.06);
        }
        .ed-goals-title {
            font-size: 0.7rem;
            text-transform: uppercase;
            letter-spacing: 0.12em;
            color: #3b82f6;
            display: flex;
            align-items: center;
            gap: 0.5rem;
        }
        .ed-goals-scroll {
            flex: 1;
            overflow-y: auto;
            padding: 1rem 1.25rem;
        }
        .ed-goal-section {
            margin-bottom: 1.25rem;
        }
        .ed-goal-section-title {
            font-size: 0.7rem;
            text-transform: uppercase;
            letter-spacing: 0.1em;
            color: var(--text-muted);
            margin-bottom: 0.75rem;
        }
        .ed-goal-chips {
            display: flex;
            flex-wrap: wrap;
            gap: 0.5rem;
        }
        .ed-goal-chip {
            background: rgba(255,255,255,0.03);
            border: 1px solid rgba(255,255,255,0.1);
            border-radius: 20px;
            padding: 0.4rem 0.9rem;
            font-size: 0.75rem;
            color: var(--text-secondary);
            cursor: pointer;
            transition: all 0.2s ease;
            display: flex;
            align-items: center;
            gap: 0.4rem;
        }
        .ed-goal-chip:hover { border-color: rgba(59,130,246,0.4); background: rgba(59,130,246,0.05); }
        .ed-goal-chip.active {
            background: rgba(59,130,246,0.15);
            border-color: rgba(59,130,246,0.4);
            color: #60a5fa;
        }
        .ed-goal-field {
            margin-bottom: 1rem;
        }
        .ed-goal-field label {
            display: block;
            font-size: 0.7rem;
            text-transform: uppercase;
            letter-spacing: 0.1em;
            color: var(--text-muted);
            margin-bottom: 0.5rem;
        }
        .ed-goal-field input,
        .ed-goal-field textarea,
        .ed-goal-field select {
            width: 100%;
            background: rgba(0,0,0,0.3);
            border: 1px solid rgba(255,255,255,0.1);
            border-radius: 8px;
            padding: 0.6rem 0.8rem;
            color: var(--text-primary);
            font-size: 0.85rem;
            font-family: inherit;
        }
        .ed-goal-field textarea {
            min-height: 80px;
            resize: vertical;
        }
        .ed-goal-field input:focus,
        .ed-goal-field textarea:focus,
        .ed-goal-field select:focus {
            outline: none;
            border-color: rgba(59,130,246,0.4);
        }
        .ed-research-context {
            background: rgba(59,130,246,0.05);
            border: 1px solid rgba(59,130,246,0.15);
            border-radius: 12px;
            padding: 1rem;
            margin-top: 0.5rem;
        }
        .ed-research-context-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 0.75rem;
            cursor: pointer;
        }
        .ed-research-context-title {
            font-size: 0.75rem;
            color: #60a5fa;
            display: flex;
            align-items: center;
            gap: 0.4rem;
        }
        .ed-research-context-badge {
            background: rgba(59,130,246,0.2);
            padding: 0.2rem 0.5rem;
            border-radius: 10px;
            font-size: 0.65rem;
            color: #60a5fa;
        }
        .ed-research-context-list {
            display: flex;
            flex-direction: column;
            gap: 0.4rem;
        }
        .ed-research-context-item {
            display: flex;
            align-items: center;
            gap: 0.5rem;
            font-size: 0.75rem;
            color: var(--text-secondary);
            padding: 0.4rem 0.5rem;
            border-radius: 6px;
            cursor: pointer;
        }
        .ed-research-context-item:hover { background: rgba(255,255,255,0.03); }
        .ed-research-context-item.disabled { opacity: 0.4; cursor: not-allowed; }
        .ed-research-context-item input { width: auto; }
        
        /* Editor Panel */
        .ed-editor-panel {
            flex: 1;
            display: flex;
            flex-direction: column;
            overflow: hidden;
        }
        .ed-editor-scroll {
            flex: 1;
            overflow-y: auto;
            padding: 2rem;
        }
        .ed-field {
            margin-bottom: 1.5rem;
        }
        .ed-field label {
            display: block;
            font-size: 0.7rem;
            text-transform: uppercase;
            letter-spacing: 0.12em;
            color: var(--text-muted);
            margin-bottom: 0.6rem;
        }
        .ed-field input {
            width: 100%;
            background: rgba(255,255,255,0.03);
            border: 1px solid rgba(255,255,255,0.1);
            border-radius: 10px;
            padding: 0.9rem 1.1rem;
            color: var(--text-primary);
            font-size: 1rem;
            font-family: 'Inter', sans-serif;
        }
        .ed-field input:focus { outline: none; border-color: rgba(59,130,246,0.4); }
        .ed-composer {
            background: rgba(255,255,255,0.02);
            border: 1px solid rgba(255,255,255,0.08);
            border-radius: 12px;
            min-height: 400px;
            position: relative;
        }
        .ed-composer-toolbar {
            display: flex;
            gap: 0.5rem;
            padding: 0.75rem 1rem;
            border-bottom: 1px solid rgba(255,255,255,0.06);
            flex-wrap: wrap;
        }
        .ed-composer-btn {
            background: rgba(59,130,246,0.1);
            border: 1px solid rgba(59,130,246,0.2);
            color: #60a5fa;
            padding: 0.4rem 0.75rem;
            border-radius: 6px;
            font-size: 0.7rem;
            cursor: pointer;
            display: flex;
            align-items: center;
            gap: 0.35rem;
            transition: all 0.2s ease;
        }
        .ed-composer-btn:hover { background: rgba(59,130,246,0.2); }
        .ed-composer-btn:disabled { opacity: 0.4; cursor: not-allowed; }
        .ed-composer-btn svg { width: 12px; height: 12px; }
        .ed-composer-textarea {
            width: 100%;
            min-height: 350px;
            background: transparent;
            border: none;
            padding: 1.25rem;
            color: var(--text-primary);
            font-size: 0.95rem;
            font-family: 'Inter', sans-serif;
            line-height: 1.8;
            resize: none;
        }
        .ed-composer-textarea:focus { outline: none; }
        .ed-composer-textarea::placeholder { color: var(--text-muted); }
        .ed-sections-list {
            display: flex;
            flex-direction: column;
            gap: 1rem;
            margin-bottom: 1.5rem;
        }
        .ed-section-item {
            background: rgba(255,255,255,0.02);
            border: 1px solid rgba(255,255,255,0.08);
            border-radius: 10px;
            padding: 1rem;
            position: relative;
        }
        .ed-section-item.active {
            border-color: rgba(59,130,246,0.4);
            background: rgba(59,130,246,0.05);
        }
        .ed-section-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 0.75rem;
        }
        .ed-section-type {
            font-size: 0.65rem;
            text-transform: uppercase;
            letter-spacing: 0.1em;
            color: #60a5fa;
            display: flex;
            align-items: center;
            gap: 0.4rem;
        }
        .ed-section-actions {
            display: flex;
            gap: 0.3rem;
        }
        .ed-section-action-btn {
            background: transparent;
            border: none;
            color: var(--text-muted);
            cursor: pointer;
            padding: 0.3rem;
            border-radius: 4px;
        }
        .ed-section-action-btn:hover { background: rgba(255,255,255,0.05); color: var(--text-primary); }
        .ed-section-textarea {
            width: 100%;
            background: rgba(0,0,0,0.2);
            border: 1px solid rgba(255,255,255,0.06);
            border-radius: 8px;
            padding: 0.75rem;
            color: var(--text-primary);
            font-size: 0.9rem;
            font-family: 'Inter', sans-serif;
            line-height: 1.7;
            resize: vertical;
            min-height: 80px;
        }
        .ed-section-textarea:focus { outline: none; border-color: rgba(59,130,246,0.3); }
        
        /* Preview Panel */
        .ed-preview-panel {
            width: 400px;
            border-left: 1px solid rgba(255,255,255,0.06);
            background: linear-gradient(180deg, rgba(255,255,255,0.02) 0%, rgba(0,0,0,0.1) 100%);
            display: flex;
            flex-direction: column;
            overflow: hidden;
        }
        .ed-preview-header {
            padding: 1rem 1.25rem;
            border-bottom: 1px solid rgba(255,255,255,0.06);
            display: flex;
            justify-content: space-between;
            align-items: center;
        }
        .ed-preview-title {
            font-size: 0.65rem;
            text-transform: uppercase;
            letter-spacing: 0.15em;
            color: var(--text-muted);
        }
        .ed-preview-badge {
            background: rgba(34,197,94,0.15);
            color: #22c55e;
            padding: 0.25rem 0.6rem;
            border-radius: 10px;
            font-size: 0.6rem;
            letter-spacing: 0.05em;
        }
        .ed-preview-content {
            flex: 1;
            overflow-y: auto;
            padding: 1.5rem;
        }
        .ed-preview-email {
            background: #ffffff;
            border-radius: 8px;
            padding: 2rem;
            color: #1f2937;
            font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
            font-size: 0.9rem;
            line-height: 1.7;
        }
        .ed-preview-email-header {
            border-bottom: 1px solid #e5e7eb;
            padding-bottom: 1rem;
            margin-bottom: 1.5rem;
        }
        .ed-preview-email-meta {
            font-size: 0.8rem;
            color: #6b7280;
            margin-bottom: 0.3rem;
        }
        .ed-preview-email-subject {
            font-size: 1.1rem;
            font-weight: 600;
            color: #111827;
        }
        .ed-preview-email-body { white-space: pre-wrap; }
        
        /* ===== PRESS RELEASE DESIGNER ===== */
        .press-designer {
            position: fixed;
            top: 0; left: 0; right: 0; bottom: 0;
            background: linear-gradient(145deg, #0a0a0f 0%, #0f0f18 50%, #0a0a12 100%);
            z-index: 10000;
            display: none;
            flex-direction: column;
        }
        .press-designer.active { display: flex; }
        
        .prd-header {
            background: linear-gradient(180deg, rgba(15,15,25,0.98) 0%, rgba(10,10,15,0.95) 100%);
            border-bottom: 1px solid rgba(168,85,247,0.2);
            padding: 0;
            display: flex;
            justify-content: space-between;
            align-items: stretch;
            height: 60px;
            box-shadow: 0 2px 20px rgba(0,0,0,0.3);
        }
        .prd-header-left {
            display: flex;
            align-items: center;
            gap: 0;
        }
        .prd-header-logo {
            display: flex;
            align-items: center;
            gap: 0.6rem;
            padding: 0 1.25rem;
            border-right: 1px solid rgba(255,255,255,0.06);
            height: 100%;
            background: rgba(168,85,247,0.05);
        }
        .prd-header-logo svg { width: 28px; height: 28px; color: #a855f7; }
        .prd-header-logo span {
            font-size: 0.65rem;
            letter-spacing: 0.15em;
            color: var(--text-muted);
            text-transform: uppercase;
        }
        .prd-header-center {
            flex: 1;
            display: flex;
            align-items: center;
            gap: 1rem;
            padding: 0 1.5rem;
        }
        .prd-type-selector {
            background: rgba(168,85,247,0.08);
            border: 1px solid rgba(168,85,247,0.2);
            border-radius: 8px;
            padding: 0.5rem 1rem;
            color: #a855f7;
            font-size: 0.85rem;
            cursor: pointer;
            min-width: 200px;
        }
        .prd-header-actions {
            display: flex;
            gap: 0.6rem;
            padding: 0 1.25rem;
            align-items: center;
        }
        .prd-btn {
            padding: 0.6rem 1.1rem;
            border-radius: 8px;
            font-size: 0.8rem;
            cursor: pointer;
            display: flex;
            align-items: center;
            gap: 0.5rem;
            transition: all 0.2s ease;
            font-family: inherit;
            font-weight: 500;
        }
        .prd-btn svg { width: 16px; height: 16px; }
        .prd-btn.secondary {
            background: rgba(255,255,255,0.04);
            border: 1px solid rgba(255,255,255,0.1);
            color: var(--text-primary);
        }
        .prd-btn.secondary:hover { background: rgba(255,255,255,0.08); border-color: rgba(168,85,247,0.4); }
        .prd-btn.primary {
            background: linear-gradient(135deg, #a855f7, #9333ea);
            border: none;
            color: white;
            font-weight: 600;
            box-shadow: 0 2px 12px rgba(168,85,247,0.25);
        }
        .prd-btn.primary:hover { transform: translateY(-1px); box-shadow: 0 4px 20px rgba(168,85,247,0.4); }
        .prd-btn.publish {
            background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
            border: none;
            color: white;
            font-weight: 600;
            padding: 0.75rem 1.5rem;
            box-shadow: 0 4px 16px rgba(34, 197, 94, 0.35);
        }
        .prd-btn.publish:hover { transform: translateY(-2px); box-shadow: 0 6px 24px rgba(34, 197, 94, 0.5); }
        .prd-close-btn {
            background: transparent;
            border: none;
            color: var(--text-muted);
            cursor: pointer;
            padding: 0.5rem;
            margin-left: 0.5rem;
            border-radius: 6px;
            transition: all 0.15s ease;
        }
        .prd-close-btn:hover { background: rgba(255,255,255,0.05); color: var(--text-primary); }
        
        .prd-body {
            flex: 1;
            display: flex;
            overflow: hidden;
        }
        
        /* Config Panel */
        .prd-config-panel {
            width: 300px;
            border-right: 1px solid rgba(255,255,255,0.06);
            background: linear-gradient(180deg, rgba(0,0,0,0.4) 0%, rgba(0,0,0,0.2) 100%);
            display: flex;
            flex-direction: column;
            overflow: hidden;
        }
        .prd-config-header {
            padding: 1.25rem 1.25rem 0.75rem;
            border-bottom: 1px solid rgba(255,255,255,0.06);
        }
        .prd-config-title {
            font-size: 0.7rem;
            text-transform: uppercase;
            letter-spacing: 0.12em;
            color: #a855f7;
            display: flex;
            align-items: center;
            gap: 0.5rem;
        }
        .prd-config-scroll {
            flex: 1;
            overflow-y: auto;
            padding: 1rem 1.25rem;
        }
        .prd-config-section {
            margin-bottom: 1.5rem;
        }
        .prd-config-section-title {
            font-size: 0.7rem;
            text-transform: uppercase;
            letter-spacing: 0.1em;
            color: var(--text-muted);
            margin-bottom: 0.75rem;
        }
        .prd-config-field {
            margin-bottom: 1rem;
        }
        .prd-config-field label {
            display: block;
            font-size: 0.7rem;
            text-transform: uppercase;
            letter-spacing: 0.1em;
            color: var(--text-muted);
            margin-bottom: 0.5rem;
        }
        .prd-config-field input,
        .prd-config-field textarea,
        .prd-config-field select {
            width: 100%;
            background: rgba(0,0,0,0.3);
            border: 1px solid rgba(255,255,255,0.1);
            border-radius: 8px;
            padding: 0.6rem 0.8rem;
            color: var(--text-primary);
            font-size: 0.85rem;
            font-family: inherit;
        }
        .prd-config-field input:focus,
        .prd-config-field textarea:focus,
        .prd-config-field select:focus {
            outline: none;
            border-color: rgba(168,85,247,0.4);
        }
        .prd-tone-chips,
        .prd-audience-chips {
            display: flex;
            flex-wrap: wrap;
            gap: 0.5rem;
        }
        .prd-chip {
            background: rgba(255,255,255,0.03);
            border: 1px solid rgba(255,255,255,0.1);
            border-radius: 20px;
            padding: 0.4rem 0.9rem;
            font-size: 0.75rem;
            color: var(--text-secondary);
            cursor: pointer;
            transition: all 0.2s ease;
        }
        .prd-chip:hover { border-color: rgba(168,85,247,0.4); background: rgba(168,85,247,0.05); }
        .prd-chip.active {
            background: rgba(168,85,247,0.15);
            border-color: rgba(168,85,247,0.4);
            color: #c084fc;
        }
        .prd-research-context {
            background: rgba(168,85,247,0.05);
            border: 1px solid rgba(168,85,247,0.15);
            border-radius: 12px;
            padding: 1rem;
        }
        .prd-research-context-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 0.75rem;
            cursor: pointer;
        }
        .prd-research-context-title {
            font-size: 0.75rem;
            color: #c084fc;
            display: flex;
            align-items: center;
            gap: 0.4rem;
        }
        .prd-research-context-badge {
            background: rgba(168,85,247,0.2);
            padding: 0.2rem 0.5rem;
            border-radius: 10px;
            font-size: 0.65rem;
            color: #c084fc;
        }
        
        /* Sections Panel */
        .prd-sections-panel {
            width: 280px;
            border-right: 1px solid rgba(255,255,255,0.06);
            background: rgba(0,0,0,0.2);
            display: flex;
            flex-direction: column;
        }
        .prd-sections-header {
            padding: 1rem 1rem 0.75rem;
            border-bottom: 1px solid rgba(255,255,255,0.06);
        }
        .prd-sections-title {
            font-size: 0.7rem;
            text-transform: uppercase;
            letter-spacing: 0.12em;
            color: var(--text-muted);
            display: flex;
            align-items: center;
            gap: 0.5rem;
        }
        .prd-sections-count {
            background: rgba(168,85,247,0.2);
            color: #c084fc;
            padding: 0.15rem 0.5rem;
            border-radius: 10px;
            font-size: 0.65rem;
        }
        .prd-sections-list {
            flex: 1;
            overflow-y: auto;
            padding: 0.75rem;
        }
        .prd-section-item {
            background: rgba(255,255,255,0.02);
            border: 1px solid rgba(255,255,255,0.06);
            border-radius: 8px;
            padding: 0.75rem;
            margin-bottom: 0.5rem;
            cursor: pointer;
            transition: all 0.2s ease;
            position: relative;
        }
        .prd-section-item::before {
            content: '';
            position: absolute;
            left: 0;
            top: 50%;
            transform: translateY(-50%);
            width: 3px;
            height: 0;
            background: #a855f7;
            border-radius: 0 2px 2px 0;
            transition: height 0.2s ease;
        }
        .prd-section-item:hover { background: rgba(255,255,255,0.04); }
        .prd-section-item.active {
            background: rgba(168,85,247,0.08);
            border-color: rgba(168,85,247,0.3);
        }
        .prd-section-item.active::before { height: 60%; }
        .prd-section-item-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
        }
        .prd-section-item-type {
            font-size: 0.6rem;
            text-transform: uppercase;
            letter-spacing: 0.08em;
            color: #c084fc;
        }
        .prd-section-item-title {
            font-size: 0.85rem;
            color: var(--text-primary);
            margin-top: 0.3rem;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
        }
        .prd-section-item.active .prd-section-item-title { color: #c084fc; }
        .prd-add-section {
            padding: 0.75rem;
            border-top: 1px solid rgba(255,255,255,0.06);
        }
        .prd-add-section-title {
            font-size: 0.65rem;
            text-transform: uppercase;
            letter-spacing: 0.1em;
            color: var(--text-muted);
            margin-bottom: 0.5rem;
        }
        .prd-add-section-btns {
            display: flex;
            flex-wrap: wrap;
            gap: 0.4rem;
        }
        .prd-add-btn {
            background: rgba(168,85,247,0.1);
            border: 1px solid rgba(168,85,247,0.2);
            color: #c084fc;
            padding: 0.35rem 0.65rem;
            border-radius: 6px;
            font-size: 0.7rem;
            cursor: pointer;
            transition: all 0.2s ease;
        }
        .prd-add-btn:hover { background: rgba(168,85,247,0.2); }
        
        /* Editor Panel */
        .prd-editor-panel {
            flex: 1;
            display: flex;
            flex-direction: column;
            overflow: hidden;
        }
        .prd-editor-scroll {
            flex: 1;
            overflow-y: auto;
            padding: 2rem;
        }
        .prd-editor-placeholder {
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            height: 100%;
            color: var(--text-muted);
            text-align: center;
            gap: 1rem;
        }
        .prd-field {
            margin-bottom: 1.5rem;
        }
        .prd-field label {
            display: block;
            font-size: 0.7rem;
            text-transform: uppercase;
            letter-spacing: 0.12em;
            color: var(--text-muted);
            margin-bottom: 0.6rem;
        }
        .prd-field input,
        .prd-field textarea {
            width: 100%;
            background: rgba(255,255,255,0.03);
            border: 1px solid rgba(255,255,255,0.1);
            border-radius: 10px;
            padding: 0.9rem 1.1rem;
            color: var(--text-primary);
            font-size: 1rem;
            font-family: 'Inter', sans-serif;
        }
        .prd-field input:focus,
        .prd-field textarea:focus { outline: none; border-color: rgba(168,85,247,0.4); }
        .prd-field textarea {
            min-height: 120px;
            resize: vertical;
            line-height: 1.7;
        }
        .prd-drafting-controls {
            background: rgba(168,85,247,0.05);
            border: 1px solid rgba(168,85,247,0.15);
            border-radius: 12px;
            padding: 1.25rem;
            margin-top: 1rem;
        }
        .prd-drafting-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 1rem;
        }
        .prd-drafting-title {
            font-size: 0.75rem;
            color: #c084fc;
            display: flex;
            align-items: center;
            gap: 0.5rem;
        }
        .prd-drafting-status {
            font-size: 0.7rem;
            color: var(--text-muted);
        }
        .prd-drafting-btns {
            display: flex;
            gap: 0.5rem;
            flex-wrap: wrap;
        }
        .prd-draft-btn {
            background: rgba(168,85,247,0.15);
            border: 1px solid rgba(168,85,247,0.3);
            color: #c084fc;
            padding: 0.5rem 1rem;
            border-radius: 8px;
            font-size: 0.8rem;
            cursor: pointer;
            display: flex;
            align-items: center;
            gap: 0.4rem;
            transition: all 0.2s ease;
        }
        .prd-draft-btn:hover { background: rgba(168,85,247,0.25); }
        .prd-draft-btn:disabled { opacity: 0.4; cursor: not-allowed; }
        .prd-draft-btn svg { width: 14px; height: 14px; }
        
        /* Preview Panel */
        .prd-preview-panel {
            width: 440px;
            border-left: 1px solid rgba(255,255,255,0.06);
            background: linear-gradient(180deg, rgba(255,255,255,0.02) 0%, rgba(0,0,0,0.1) 100%);
            display: flex;
            flex-direction: column;
            overflow: hidden;
        }
        .prd-preview-header {
            padding: 1rem 1.25rem;
            border-bottom: 1px solid rgba(255,255,255,0.06);
            display: flex;
            justify-content: space-between;
            align-items: center;
        }
        .prd-preview-title {
            font-size: 0.65rem;
            text-transform: uppercase;
            letter-spacing: 0.15em;
            color: var(--text-muted);
        }
        .prd-preview-badge {
            background: rgba(34,197,94,0.15);
            color: #22c55e;
            padding: 0.25rem 0.6rem;
            border-radius: 10px;
            font-size: 0.6rem;
            letter-spacing: 0.05em;
        }
        .prd-preview-content {
            flex: 1;
            overflow-y: auto;
            padding: 1.5rem;
        }
        .prd-preview-release {
            background: #ffffff;
            border-radius: 8px;
            padding: 2.5rem;
            color: #1f2937;
            font-family: 'Inter', sans-serif;
            font-size: 0.95rem;
            line-height: 1.8;
        }
        .prd-preview-letterhead {
            text-align: center;
            padding-bottom: 1.5rem;
            margin-bottom: 1.5rem;
            border-bottom: 2px solid #1f2937;
        }
        .prd-preview-logo {
            font-family: 'Space Grotesk', sans-serif;
            font-size: 1.3rem;
            letter-spacing: 0.15em;
            color: #1f2937;
            margin-bottom: 0.5rem;
        }
        .prd-preview-dateline {
            font-size: 0.85rem;
            color: #6b7280;
        }
        .prd-preview-headline {
            font-family: 'Inter', sans-serif;
            font-size: 1.5rem;
            font-weight: 700;
            color: #111827;
            margin-bottom: 1rem;
            line-height: 1.3;
        }
        .prd-preview-subhead {
            font-size: 1.1rem;
            color: #4b5563;
            font-style: italic;
            margin-bottom: 1.5rem;
        }
        .prd-preview-body { white-space: pre-wrap; }
        .prd-preview-quote {
            border-left: 3px solid #a855f7;
            padding-left: 1.25rem;
            margin: 1.5rem 0;
            font-style: italic;
            color: #4b5563;
        }
        .prd-preview-quote-attr {
            font-style: normal;
            font-size: 0.85rem;
            margin-top: 0.5rem;
            color: #6b7280;
        }
        .prd-preview-boilerplate {
            background: #f3f4f6;
            padding: 1.25rem;
            border-radius: 6px;
            margin-top: 2rem;
            font-size: 0.85rem;
            color: #4b5563;
        }
        .prd-preview-boilerplate-title {
            font-weight: 600;
            color: #1f2937;
            margin-bottom: 0.5rem;
        }
        .prd-preview-contact {
            margin-top: 1.5rem;
            padding-top: 1rem;
            border-top: 1px solid #e5e7eb;
            font-size: 0.85rem;
            color: #6b7280;
        }
        
        /* ===== EMAIL INBOX STYLES ===== */
        /* ===== PARTNER INTELLIGENCE HUB ===== */
        .org-intel-hub {
            position: fixed;
            top: 0; left: 0; right: 0; bottom: 0;
            background: linear-gradient(145deg, #0a0a0f 0%, #0f0f18 50%, #0a0a12 100%);
            z-index: 9998;
            display: none;
            flex-direction: column;
        }
        .org-intel-hub.active { display: flex; }
        
        /* Header */
        .pih-header {
            background: linear-gradient(180deg, rgba(15,15,25,0.98) 0%, rgba(10,10,15,0.95) 100%);
            border-bottom: 1px solid rgba(59,130,246,0.2);
            padding: 0;
            display: flex;
            justify-content: space-between;
            align-items: stretch;
            height: 60px;
            box-shadow: 0 2px 20px rgba(0,0,0,0.3);
        }
        .pih-header-left {
            display: flex;
            align-items: center;
            gap: 0;
        }
        .pih-header-logo {
            display: flex;
            align-items: center;
            gap: 0.6rem;
            padding: 0 1.25rem;
            border-right: 1px solid rgba(255,255,255,0.06);
            height: 100%;
            background: rgba(59,130,246,0.05);
        }
        .pih-header-logo svg { width: 28px; height: 28px; color: #3b82f6; }
        .pih-header-logo span {
            font-family: 'Space Grotesk', sans-serif;
            font-size: 0.9rem;
            letter-spacing: 0.08em;
            color: var(--text-primary);
        }
        
        /* Tabs */
        .pih-tabs {
            display: flex;
            align-items: stretch;
            height: 100%;
        }
        .pih-tab {
            display: flex;
            align-items: center;
            gap: 0.5rem;
            padding: 0 1.5rem;
            background: transparent;
            border: none;
            border-bottom: 2px solid transparent;
            color: var(--text-muted);
            font-size: 0.85rem;
            cursor: pointer;
            transition: all 0.2s ease;
            font-family: inherit;
        }
        .pih-tab:hover { color: var(--text-primary); background: rgba(255,255,255,0.02); }
        .pih-tab.active {
            color: #3b82f6;
            border-bottom-color: #3b82f6;
            background: rgba(59,130,246,0.05);
        }
        .pih-tab svg { width: 16px; height: 16px; }
        .pih-tab-badge {
            background: rgba(59,130,246,0.2);
            color: #60a5fa;
            padding: 0.15rem 0.5rem;
            border-radius: 10px;
            font-size: 0.65rem;
            font-weight: 600;
        }
        .pih-tab-badge.gold { background: rgba(212,168,85,0.2); color: var(--gold-primary); }
        .pih-tab-badge.green { background: rgba(34,197,94,0.2); color: #22c55e; }
        
        .pih-header-actions {
            display: flex;
            align-items: center;
            gap: 0.75rem;
            padding: 0 1.25rem;
        }
        .pih-btn {
            padding: 0.5rem 1rem;
            border-radius: 8px;
            font-size: 0.85rem;
            font-weight: 500;
            cursor: pointer;
            display: flex;
            align-items: center;
            gap: 0.5rem;
            transition: all 0.2s;
        }
        
        .pih-btn:hover { filter: brightness(1.1); }
        
        .pih-close-btn {
            background: transparent;
            border: none;
            color: var(--text-muted);
            cursor: pointer;
            padding: 0.5rem;
            border-radius: 6px;
            transition: all 0.15s ease;
        }
        .pih-close-btn:hover { background: rgba(255,255,255,0.05); color: var(--text-primary); }
        
        /* Body */
        .pih-body {
            flex: 1;
            display: flex;
            overflow: hidden;
            position: relative;
        }
        
        /* Tab Content Panels */
        .pih-panel {
            display: none;
            flex: 1;
            overflow: hidden;
        }
        .pih-panel.active { display: flex; }
        
        /* ===== HORIZONTAL SCROLL WORKSPACE ===== */
        .pih-workspace {
            display: flex;
            overflow-x: auto;
            overflow-y: hidden;
            scroll-behavior: smooth;
            scroll-snap-type: x mandatory;
            flex: 1;
            gap: 0;
            scrollbar-width: none;
        }
        .pih-workspace::-webkit-scrollbar { display: none; }
        
        .pih-module {
            flex: 0 0 auto;
            scroll-snap-align: start;
            scroll-snap-stop: always;
            display: flex;
            flex-direction: column;
            border-right: 1px solid rgba(255,255,255,0.06);
            background: rgba(0,0,0,0.15);
            transition: opacity 0.2s ease;
        }
        .pih-module:last-child { border-right: none; }
        
        .pih-module-header {
            padding: 0.75rem 1rem;
            background: rgba(0,0,0,0.3);
            border-bottom: 1px solid rgba(255,255,255,0.06);
            display: flex;
            justify-content: space-between;
            align-items: center;
            flex-shrink: 0;
        }
        .pih-module-title {
            font-family: 'Space Grotesk', sans-serif;
            font-size: 0.8rem;
            letter-spacing: 0.05em;
            color: var(--text-primary);
            display: flex;
            align-items: center;
            gap: 0.5rem;
        }
        .pih-module-title svg { width: 16px; height: 16px; opacity: 0.6; }
        .pih-module-badge {
            font-size: 0.65rem;
            padding: 0.15rem 0.5rem;
            border-radius: 8px;
            background: rgba(59,130,246,0.15);
            color: #60a5fa;
        }
        .pih-module-badge.gold { background: rgba(212,168,85,0.15); color: var(--gold-primary); }
        .pih-module-badge.green { background: rgba(34,197,94,0.15); color: #22c55e; }
        .pih-module-content {
            flex: 1;
            overflow-y: auto;
            overflow-x: hidden;
        }
        
        /* Module Sizes */
        .pih-module.filters { width: 240px; min-width: 240px; }
        .pih-module.organizations { width: 420px; min-width: 420px; }
        .pih-module.queue { width: 380px; min-width: 380px; }
        .pih-module.discovery { width: 480px; min-width: 480px; }
        .pih-module.scanners { width: 360px; min-width: 360px; }
        .pih-module.feed { width: 420px; min-width: 420px; }
        
        /* Scroll Navigation */
        .pih-scroll-nav {
            position: absolute;
            bottom: 1rem;
            left: 50%;
            transform: translateX(-50%);
            display: flex;
            gap: 0.5rem;
            padding: 0.5rem 0.75rem;
            background: rgba(0,0,0,0.8);
            border-radius: 20px;
            border: 1px solid rgba(255,255,255,0.1);
            z-index: 10;
        }
        .pih-scroll-dot {
            width: 8px;
            height: 8px;
            border-radius: 50%;
            background: rgba(255,255,255,0.2);
            cursor: pointer;
            transition: all 0.2s ease;
        }
        .pih-scroll-dot:hover { background: rgba(255,255,255,0.4); }
        .pih-scroll-dot.active { background: #3b82f6; width: 20px; border-radius: 4px; }
        
        .pih-scroll-btn {
            position: absolute;
            top: 50%;
            transform: translateY(-50%);
            width: 36px;
            height: 36px;
            border-radius: 50%;
            background: rgba(0,0,0,0.8);
            border: 1px solid rgba(255,255,255,0.15);
            color: var(--text-secondary);
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            z-index: 10;
            transition: all 0.2s ease;
        }
        .pih-scroll-btn:hover { background: rgba(59,130,246,0.3); border-color: rgba(59,130,246,0.5); color: #60a5fa; }
        .pih-scroll-btn.left { left: 0.5rem; }
        .pih-scroll-btn.right { right: 0.5rem; }
        .pih-scroll-btn svg { width: 18px; height: 18px; }
        
        /* Partners Panel - now uses workspace */
        .pih-orgs-panel {
            display: flex;
            position: relative;
            overflow-x: auto;
            overflow-y: hidden;
            scroll-behavior: smooth;
            scrollbar-width: thin;
            scrollbar-color: rgba(255,255,255,0.2) transparent;
        }
        .pih-orgs-panel::-webkit-scrollbar {
            height: 8px;
        }
        .pih-orgs-panel::-webkit-scrollbar-track {
            background: transparent;
        }
        .pih-orgs-panel::-webkit-scrollbar-thumb {
            background: rgba(255,255,255,0.15);
            border-radius: 4px;
        }
        .pih-orgs-panel::-webkit-scrollbar-thumb:hover {
            background: rgba(255,255,255,0.25);
        }
        
        /* Filters Sidebar */
        .pih-filters {
            width: 220px;
            min-width: 220px;
            flex-shrink: 0;
            border-right: 1px solid rgba(255,255,255,0.06);
            background: rgba(0,0,0,0.2);
            display: flex;
            flex-direction: column;
            overflow: hidden;
        }
        .pih-filters-header {
            padding: 1rem;
            border-bottom: 1px solid rgba(255,255,255,0.06);
            display: flex;
            justify-content: space-between;
            align-items: center;
        }
        .pih-filters-title {
            font-size: 0.7rem;
            text-transform: uppercase;
            letter-spacing: 0.12em;
            color: var(--text-muted);
            display: flex;
            align-items: center;
            gap: 0.5rem;
        }
        .pih-filters-clear {
            font-size: 0.7rem;
            color: #60a5fa;
            cursor: pointer;
            background: none;
            border: none;
        }
        .pih-filters-scroll {
            flex: 1;
            overflow-y: auto;
            padding: 0.75rem;
        }
        .pih-filter-section {
            margin-bottom: 1.25rem;
        }
        .pih-filter-label {
            font-size: 0.65rem;
            text-transform: uppercase;
            letter-spacing: 0.1em;
            color: var(--text-muted);
            margin-bottom: 0.6rem;
            display: flex;
            align-items: center;
            gap: 0.4rem;
        }
        .pih-filter-chips {
            display: flex;
            flex-wrap: wrap;
            gap: 0.4rem;
        }
        .pih-filter-chip {
            background: rgba(255,255,255,0.03);
            border: 1px solid rgba(255,255,255,0.08);
            border-radius: 16px;
            padding: 0.35rem 0.7rem;
            font-size: 0.7rem;
            color: var(--text-secondary);
            cursor: pointer;
            transition: all 0.2s ease;
        }
        .pih-filter-chip:hover { border-color: rgba(59,130,246,0.4); background: rgba(59,130,246,0.05); }
        .pih-filter-chip.active {
            background: rgba(59,130,246,0.15);
            border-color: rgba(59,130,246,0.4);
            color: #60a5fa;
        }
        .pih-quick-filters {
            padding: 0.75rem;
            border-top: 1px solid rgba(255,255,255,0.06);
            background: rgba(0,0,0,0.15);
        }
        .pih-quick-filter-btn {
            display: block;
            width: 100%;
            background: rgba(34,197,94,0.08);
            border: 1px solid rgba(34,197,94,0.2);
            color: #22c55e;
            padding: 0.5rem 0.75rem;
            border-radius: 8px;
            font-size: 0.75rem;
            cursor: pointer;
            text-align: left;
            margin-bottom: 0.4rem;
            transition: all 0.2s ease;
        }
        .pih-quick-filter-btn:hover { background: rgba(34,197,94,0.15); }
        .pih-quick-filter-btn.warning {
            background: rgba(251,191,36,0.08);
            border-color: rgba(251,191,36,0.2);
            color: #fbbf24;
        }
        .pih-quick-filter-btn.purple {
            background: rgba(168,85,247,0.08);
            border-color: rgba(168,85,247,0.2);
            color: #a855f7;
        }
        
        /* Bulk Actions Bar */
        .pih-bulk-actions {
            padding: 0.75rem;
            background: linear-gradient(135deg, rgba(59,130,246,0.1) 0%, rgba(59,130,246,0.05) 100%);
            border: 1px solid rgba(59,130,246,0.2);
            border-radius: 10px;
            margin: 0.75rem;
            display: none;
        }
        .pih-bulk-actions.visible { display: block; }
        .pih-bulk-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 0.6rem;
        }
        .pih-bulk-count {
            font-size: 0.8rem;
            color: #60a5fa;
            display: flex;
            align-items: center;
            gap: 0.4rem;
        }
        .pih-bulk-count strong {
            font-size: 1rem;
            color: var(--text-primary);
        }
        .pih-bulk-clear {
            font-size: 0.7rem;
            color: var(--text-muted);
            cursor: pointer;
            background: none;
            border: none;
        }
        .pih-bulk-clear:hover { color: #ef4444; }
        .pih-bulk-btns {
            display: flex;
            gap: 0.5rem;
            flex-wrap: wrap;
        }
        .pih-bulk-btn {
            flex: 1;
            min-width: 90px;
            padding: 0.55rem 0.75rem;
            border-radius: 8px;
            font-size: 0.75rem;
            cursor: pointer;
            font-family: inherit;
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 0.35rem;
            transition: all 0.2s ease;
        }
        .pih-bulk-btn.email {
            background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
            border: none;
            color: white;
        }
        .pih-bulk-btn.email:hover { box-shadow: 0 4px 12px rgba(59,130,246,0.3); }
        .pih-bulk-btn.queue {
            background: rgba(212,168,85,0.15);
            border: 1px solid rgba(212,168,85,0.3);
            color: var(--gold-primary);
        }
        .pih-bulk-btn.research {
            background: rgba(168,85,247,0.15);
            border: 1px solid rgba(168,85,247,0.3);
            color: #c084fc;
        }
        .pih-bulk-btn svg { width: 14px; height: 14px; }
        
        /* Select All Filtered Button */
        .pih-select-all-btn {
            padding: 0.4rem 0.75rem;
            background: rgba(59,130,246,0.1);
            border: 1px solid rgba(59,130,246,0.25);
            border-radius: 6px;
            font-size: 0.7rem;
            color: #60a5fa;
            cursor: pointer;
            transition: all 0.2s ease;
            white-space: nowrap;
        }
        .pih-select-all-btn:hover { background: rgba(59,130,246,0.2); }
        
        /* Partner List */
        .pih-list {
            flex: 1;
            min-width: 420px;
            display: flex;
            flex-direction: column;
            overflow: hidden;
            border-right: 1px solid rgba(255,255,255,0.06);
        }
        .pih-list-header {
            padding: 1rem 1.25rem;
            border-bottom: 1px solid rgba(255,255,255,0.06);
            display: flex;
            justify-content: space-between;
            align-items: center;
            gap: 1rem;
        }
        .pih-search {
            flex: 1;
            display: flex;
            align-items: center;
            gap: 0.75rem;
            background: rgba(0,0,0,0.3);
            border: 1px solid rgba(255,255,255,0.08);
            border-radius: 10px;
            padding: 0.6rem 1rem;
        }
        .pih-search svg { color: var(--text-muted); flex-shrink: 0; }
        .pih-search input {
            flex: 1;
            background: transparent;
            border: none;
            color: var(--text-primary);
            font-size: 0.9rem;
            outline: none;
        }
        .pih-list-actions {
            display: flex;
            gap: 0.5rem;
        }
        .pih-list-btn {
            background: rgba(255,255,255,0.03);
            border: 1px solid rgba(255,255,255,0.1);
            color: var(--text-secondary);
            padding: 0.5rem 0.75rem;
            border-radius: 6px;
            font-size: 0.75rem;
            cursor: pointer;
            transition: all 0.2s ease;
            display: flex;
            align-items: center;
            gap: 0.35rem;
        }
        .pih-list-btn:hover { background: rgba(255,255,255,0.06); color: var(--text-primary); }
        .pih-list-btn.primary {
            background: rgba(59,130,246,0.15);
            border-color: rgba(59,130,246,0.3);
            color: #60a5fa;
        }
        
        .pih-list-stats {
            padding: 0.5rem 1.25rem;
            background: rgba(0,0,0,0.15);
            border-bottom: 1px solid rgba(255,255,255,0.04);
            display: flex;
            justify-content: space-between;
            font-size: 0.75rem;
            color: var(--text-muted);
        }
        .pih-list-stats-selected { color: #60a5fa; }
        
        .pih-list-scroll {
            flex: 1;
            overflow-y: auto;
            padding: 0.75rem 1rem;
        }
        
        /* Partner Cards */
        .pih-card {
            background: rgba(255,255,255,0.02);
            border: 1px solid rgba(255,255,255,0.06);
            border-radius: 12px;
            padding: 1rem;
            margin-bottom: 0.6rem;
            cursor: pointer;
            transition: all 0.2s ease;
            display: grid;
            grid-template-columns: auto 1fr auto;
            gap: 1rem;
            align-items: center;
        }
        .pih-card:hover {
            background: rgba(255,255,255,0.04);
            border-color: rgba(255,255,255,0.1);
            transform: translateX(2px);
        }
        .pih-card.selected {
            background: rgba(59,130,246,0.1);
            border-color: rgba(59,130,246,0.4);
        }
        .pih-card.in-queue {
            background: rgba(212,168,85,0.1);
            border-color: rgba(212,168,85,0.3);
        }
        .pih-card-checkbox {
            width: 20px;
            height: 20px;
            border: 2px solid rgba(255,255,255,0.2);
            border-radius: 4px;
            display: flex;
            align-items: center;
            justify-content: center;
            transition: all 0.2s ease;
        }
        .pih-card.selected .pih-card-checkbox {
            background: #3b82f6;
            border-color: #3b82f6;
        }
        .pih-card-checkbox svg { display: none; color: white; width: 12px; height: 12px; }
        .pih-card.selected .pih-card-checkbox svg { display: block; }
        
        .pih-card-info { min-width: 0; }
        .pih-card-name {
            font-size: 0.95rem;
            font-weight: 500;
            color: var(--text-primary);
            margin-bottom: 0.25rem;
        }
        .pih-card-org {
            font-size: 0.8rem;
            color: var(--text-muted);
            display: flex;
            align-items: center;
            gap: 0.75rem;
            flex-wrap: wrap;
        }
        .pih-card-meta {
            display: flex;
            flex-direction: column;
            align-items: flex-end;
            gap: 0.5rem;
        }
        .pih-card-type {
            font-size: 0.6rem;
            text-transform: uppercase;
            letter-spacing: 0.08em;
            padding: 0.25rem 0.6rem;
            border-radius: 12px;
            background: rgba(156,163,175,0.15);
            color: #9ca3af;
        }
        .pih-card-type.university { background: rgba(212,168,83,0.15); color: #D4A853; }
        .pih-card-type.media { background: rgba(255,107,53,0.15); color: #FF6B35; }
        .pih-card-type.government { background: rgba(34,197,94,0.15); color: #22c55e; }
        .pih-card-type.law_firm { background: rgba(245,158,11,0.15); color: #f59e0b; }
        .pih-card-type.corporate { background: rgba(59,130,246,0.15); color: #3b82f6; }
        .pih-card-research {
            display: flex;
            gap: 3px;
        }
        .pih-research-dot {
            width: 6px;
            height: 6px;
            border-radius: 50%;
            background: rgba(255,255,255,0.1);
        }
        .pih-research-dot.filled { background: #22c55e; }
        
        /* Queue Panel */
        .pih-queue {
            width: 340px;
            min-width: 340px;
            flex-shrink: 0;
            border-left: 1px solid rgba(212,168,85,0.2);
            background: linear-gradient(180deg, rgba(212,168,85,0.05) 0%, rgba(0,0,0,0.2) 100%);
            display: flex;
            flex-direction: column;
            overflow: hidden;
        }
        .pih-queue-header {
            padding: 1rem;
            border-bottom: 1px solid rgba(212,168,85,0.2);
        }
        .pih-queue-title {
            display: flex;
            align-items: center;
            gap: 0.5rem;
            font-size: 1rem;
            color: var(--gold-primary);
            margin-bottom: 0.5rem;
            font-family: 'Space Grotesk', sans-serif;
        }
        .pih-queue-subtitle {
            font-size: 0.8rem;
            color: var(--text-muted);
        }
        .pih-queue-stats {
            display: grid;
            grid-template-columns: repeat(2, 1fr);
            gap: 0.5rem;
            padding: 0.75rem 1rem;
            background: rgba(0,0,0,0.2);
        }
        .pih-queue-stat {
            text-align: center;
            padding: 0.5rem;
            background: rgba(0,0,0,0.2);
            border-radius: 8px;
        }
        .pih-queue-stat-value {
            font-size: 1.25rem;
            font-weight: 600;
            color: var(--gold-primary);
        }
        .pih-queue-stat-label {
            font-size: 0.6rem;
            color: var(--text-muted);
            text-transform: uppercase;
            letter-spacing: 0.05em;
        }
        .pih-queue-list {
            flex: 1;
            overflow-y: auto;
            padding: 0.75rem;
        }
        .pih-queue-item {
            background: rgba(0,0,0,0.2);
            border: 1px solid rgba(212,168,85,0.15);
            border-radius: 8px;
            padding: 0.6rem 0.75rem;
            margin-bottom: 0.4rem;
            display: flex;
            justify-content: space-between;
            align-items: center;
        }
        .pih-queue-item-name {
            font-size: 0.8rem;
            color: var(--text-primary);
            flex: 1;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
        }
        .pih-queue-item-remove {
            background: transparent;
            border: none;
            color: var(--text-muted);
            cursor: pointer;
            padding: 0.2rem;
        }
        .pih-queue-item-remove:hover { color: #ef4444; }
        .pih-queue-actions {
            padding: 1rem;
            border-top: 1px solid rgba(212,168,85,0.2);
            display: flex;
            flex-direction: column;
            gap: 0.5rem;
        }
        .pih-queue-btn {
            padding: 0.65rem 1rem;
            border-radius: 8px;
            font-size: 0.8rem;
            cursor: pointer;
            font-family: inherit;
            font-weight: 500;
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 0.5rem;
            transition: all 0.2s ease;
        }
        .pih-queue-btn.primary {
            background: linear-gradient(135deg, var(--gold-primary), #c9a54a);
            border: none;
            color: #0a0a0f;
            font-weight: 600;
        }
        .pih-queue-btn.primary:hover { transform: translateY(-1px); box-shadow: 0 4px 16px rgba(212,168,85,0.3); }
        .pih-queue-btn.primary:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }
        .pih-queue-btn.secondary {
            background: rgba(255,255,255,0.03);
            border: 1px solid rgba(255,255,255,0.1);
            color: var(--text-primary);
        }
        
        /* ===== PROPOSAL QUEUE BAR (in Proposal Designer) ===== */
        .pq-queue-bar {
            display: flex;
            align-items: center;
            gap: 1rem;
            padding: 0.75rem 1.5rem;
            background: linear-gradient(135deg, rgba(168,85,247,0.1), rgba(212,168,85,0.1));
            border-bottom: 1px solid rgba(168,85,247,0.2);
            flex-wrap: wrap;
            z-index: 10;
        }
        .pq-bar-nav {
            display: flex;
            align-items: center;
            gap: 0.5rem;
        }
        .pq-nav-btn {
            width: 32px; height: 32px;
            border: 1px solid var(--border-subtle, rgba(255,255,255,0.1));
            border-radius: 6px;
            background: rgba(255,255,255,0.05);
            color: var(--text-primary, #f5f5f5);
            cursor: pointer;
            display: flex; align-items: center; justify-content: center;
            transition: all 0.2s;
        }
        .pq-nav-btn:hover:not(:disabled) { background: rgba(168,85,247,0.2); border-color: rgba(168,85,247,0.4); }
        .pq-nav-btn:disabled { opacity: 0.3; cursor: not-allowed; }
        .pq-bar-position { font-weight: 600; font-size: 0.9rem; color: var(--text-primary, #f5f5f5); min-width: 50px; text-align: center; }
        .pq-bar-info { flex: 1; min-width: 0; }
        .pq-bar-partner { font-weight: 600; color: var(--text-primary, #f5f5f5); margin-right: 0.5rem; }
        .pq-bar-status { font-size: 0.7rem; padding: 2px 8px; border-radius: 10px; text-transform: uppercase; letter-spacing: 0.05em; }
        .pq-status-pending { background: rgba(234,179,8,0.2); color: #fbbf24; }
        .pq-status-in_progress { background: rgba(59,130,246,0.2); color: #60a5fa; }
        .pq-status-approved { background: rgba(34,197,94,0.2); color: #4ade80; }
        .pq-status-draft { background: rgba(168,85,247,0.2); color: #c084fc; }
        .pq-status-skipped { background: rgba(107,114,128,0.2); color: #9ca3af; }
        .pq-bar-progress { display: flex; align-items: center; gap: 0.5rem; min-width: 160px; }
        .pq-progress-bar { flex: 1; height: 6px; background: rgba(255,255,255,0.1); border-radius: 3px; overflow: hidden; }
        .pq-progress-fill { height: 100%; background: linear-gradient(90deg, #a855f7, #d4a853); border-radius: 3px; transition: width 0.3s; }
        .pq-progress-text { font-size: 0.7rem; color: var(--text-muted, rgba(245,245,245,0.5)); white-space: nowrap; }
        .pq-bar-actions { display: flex; gap: 0.5rem; }
        .pq-action-btn {
            padding: 6px 12px;
            border: 1px solid var(--border-subtle, rgba(255,255,255,0.1));
            border-radius: 6px;
            font-size: 0.75rem;
            font-weight: 600;
            cursor: pointer;
            transition: all 0.2s;
            text-transform: uppercase;
            letter-spacing: 0.03em;
        }
        .pq-action-btn.skip { background: rgba(107,114,128,0.15); color: #9ca3af; border-color: rgba(107,114,128,0.3); }
        .pq-action-btn.skip:hover { background: rgba(107,114,128,0.3); }
        .pq-action-btn.draft { background: rgba(168,85,247,0.15); color: #c084fc; border-color: rgba(168,85,247,0.3); }
        .pq-action-btn.draft:hover { background: rgba(168,85,247,0.3); }
        .pq-action-btn.approve { background: rgba(34,197,94,0.15); color: #4ade80; border-color: rgba(34,197,94,0.3); }
        .pq-action-btn.approve:hover { background: rgba(34,197,94,0.3); }
        .pq-action-btn.exit { background: rgba(239,68,68,0.15); color: #f87171; border-color: rgba(239,68,68,0.3); }
        .pq-action-btn.exit:hover { background: rgba(239,68,68,0.3); }

        /* ===== CONTACT DISCOVERY PANEL ===== */
        .pih-discovery-panel {
            display: flex;
            flex-direction: column;
            width: 100%;
            overflow: hidden;
        }
        .pih-discovery-main {
            flex: 1;
            display: flex;
            overflow-x: auto;
            overflow-y: hidden;
            scroll-behavior: smooth;
            scrollbar-width: thin;
            scrollbar-color: rgba(255,255,255,0.2) transparent;
        }
        .pih-discovery-main::-webkit-scrollbar {
            height: 8px;
        }
        .pih-discovery-main::-webkit-scrollbar-track {
            background: transparent;
        }
        .pih-discovery-main::-webkit-scrollbar-thumb {
            background: rgba(255,255,255,0.15);
            border-radius: 4px;
        }
        
        /* Discovery Config */
        .pih-discovery-config {
            width: 380px;
            min-width: 380px;
            flex-shrink: 0;
            border-right: 1px solid rgba(255,255,255,0.06);
            background: rgba(0,0,0,0.2);
            display: flex;
            flex-direction: column;
            overflow: hidden;
        }
        .pih-discovery-config-header {
            padding: 1.25rem;
            border-bottom: 1px solid rgba(255,255,255,0.06);
        }
        .pih-discovery-config-title {
            font-size: 0.75rem;
            text-transform: uppercase;
            letter-spacing: 0.12em;
            color: #22c55e;
            display: flex;
            align-items: center;
            gap: 0.5rem;
            margin-bottom: 0.5rem;
        }
        .pih-discovery-config-subtitle {
            font-size: 0.8rem;
            color: var(--text-muted);
        }
        .pih-discovery-config-scroll {
            flex: 1;
            overflow-y: auto;
            padding: 1rem 1.25rem;
        }
        .pih-discovery-section {
            margin-bottom: 1.5rem;
        }
        .pih-discovery-label {
            font-size: 0.65rem;
            text-transform: uppercase;
            letter-spacing: 0.1em;
            color: var(--text-muted);
            margin-bottom: 0.6rem;
            display: flex;
            align-items: center;
            gap: 0.4rem;
        }
        .pih-discovery-chips {
            display: flex;
            flex-wrap: wrap;
            gap: 0.4rem;
        }
        .pih-discovery-chip {
            background: rgba(255,255,255,0.03);
            border: 1px solid rgba(255,255,255,0.08);
            border-radius: 16px;
            padding: 0.4rem 0.8rem;
            font-size: 0.75rem;
            color: var(--text-secondary);
            cursor: pointer;
            transition: all 0.2s ease;
        }
        .pih-discovery-chip:hover { border-color: rgba(34,197,94,0.4); background: rgba(34,197,94,0.05); }
        .pih-discovery-chip.active {
            background: rgba(34,197,94,0.15);
            border-color: rgba(34,197,94,0.4);
            color: #22c55e;
        }
        .pih-quick-filter {
            background: rgba(255,255,255,0.03);
            border: 1px solid rgba(255,255,255,0.1);
            border-radius: 4px;
            padding: 0.25rem 0.5rem;
            font-size: 0.7rem;
            color: var(--text-muted);
            cursor: pointer;
            transition: all 0.2s ease;
        }
        .pih-quick-filter:hover { border-color: rgba(59,130,246,0.4); color: var(--text-secondary); }
        .pih-quick-filter.active {
            background: rgba(59,130,246,0.15);
            border-color: rgba(59,130,246,0.4);
            color: #60a5fa;
        }
        
        /* Agent Processing Styles */
        .pih-agent-banner {
            background: linear-gradient(135deg, rgba(59,130,246,0.1) 0%, rgba(139,92,246,0.1) 100%);
            border: 1px solid rgba(59,130,246,0.3);
            border-radius: 8px;
            padding: 0.75rem;
            margin: 0.5rem;
        }
        .pih-agent-status {
            display: flex;
            align-items: center;
            gap: 0.5rem;
            margin-bottom: 0.5rem;
        }
        .pih-agent-icon {
            font-size: 1.2rem;
            animation: pulse 1.5s ease-in-out infinite;
        }
        .pih-agent-status span:last-child {
            font-size: 0.8rem;
            color: var(--text-secondary);
        }
        .pih-agent-progress {
            height: 4px;
            background: rgba(255,255,255,0.1);
            border-radius: 2px;
            overflow: hidden;
        }
        .pih-agent-progress-bar {
            height: 100%;
            background: linear-gradient(90deg, #3b82f6, #8b5cf6);
            border-radius: 2px;
            width: 0%;
            transition: width 0.3s ease;
            animation: progressPulse 1.5s ease-in-out infinite;
        }
        @keyframes progressPulse {
            0%, 100% { opacity: 1; }
            50% { opacity: 0.7; }
        }
        
        .pih-processing-summary {
            background: rgba(0,0,0,0.2);
            border-radius: 8px;
            padding: 0.75rem;
            margin: 0.5rem;
        }
        .pih-summary-stats {
            display: flex;
            gap: 0.5rem;
            margin-bottom: 0.5rem;
        }
        .pih-summary-stat {
            flex: 1;
            text-align: center;
            padding: 0.5rem;
            border-radius: 6px;
            background: rgba(255,255,255,0.03);
        }
        .pih-summary-stat.approve { border-left: 3px solid #22c55e; }
        .pih-summary-stat.review { border-left: 3px solid #f59e0b; }
        .pih-summary-stat.skip { border-left: 3px solid #6b7280; }
        .pih-summary-count {
            display: block;
            font-size: 1.25rem;
            font-weight: 600;
            color: var(--text-primary);
        }
        .pih-summary-label {
            font-size: 0.7rem;
            color: var(--text-muted);
            text-transform: uppercase;
            letter-spacing: 0.05em;
        }
        .pih-summary-actions {
            display: flex;
            gap: 0.25rem;
        }
        .pih-summary-btn {
            flex: 1;
            padding: 0.4rem 0.5rem;
            font-size: 0.7rem;
            background: rgba(255,255,255,0.03);
            border: 1px solid rgba(255,255,255,0.1);
            border-radius: 4px;
            color: var(--text-muted);
            cursor: pointer;
            transition: all 0.2s ease;
        }
        .pih-summary-btn:hover { background: rgba(255,255,255,0.05); color: var(--text-secondary); }
        .pih-summary-btn.active { background: rgba(59,130,246,0.15); border-color: rgba(59,130,246,0.4); color: #60a5fa; }
        .pih-summary-btn.approve:hover { border-color: rgba(34,197,94,0.4); color: #22c55e; }
        .pih-summary-btn.review:hover { border-color: rgba(245,158,11,0.4); color: #f59e0b; }
        
        /* Processed Contact Card Styles */
        .pih-discovered-card.processed {
            border-left: 3px solid transparent;
        }
        .pih-discovered-card.processed.approve {
            border-left-color: #22c55e;
            background: rgba(34,197,94,0.03);
        }
        .pih-discovered-card.processed.review {
            border-left-color: #f59e0b;
            background: rgba(245,158,11,0.03);
        }
        .pih-discovered-card.processed.skip {
            border-left-color: #6b7280;
            opacity: 0.6;
        }
        .pih-discovered-card.hidden {
            display: none;
        }
        .pih-discovered-card.duplicate {
            border-left-color: #ef4444;
            opacity: 0.7;
        }
        .pih-existing-badge {
            display: inline-flex;
            align-items: center;
            gap: 0.25rem;
            padding: 0.15rem 0.4rem;
            background: rgba(245,158,11,0.15);
            color: #f59e0b;
            font-size: 0.65rem;
            border-radius: 4px;
            font-weight: 500;
        }
        .pih-new-badge {
            display: inline-flex;
            align-items: center;
            gap: 0.25rem;
            padding: 0.15rem 0.4rem;
            background: rgba(34,197,94,0.15);
            color: #22c55e;
            font-size: 0.65rem;
            border-radius: 4px;
            font-weight: 500;
        }
        .pih-duplicate-warning {
            background: rgba(239,68,68,0.1);
            color: #ef4444;
            padding: 0.4rem 0.6rem;
            font-size: 0.7rem;
            border-radius: 4px;
            margin-top: 0.5rem;
        }
        .pih-coverage-stats {
            background: rgba(0,0,0,0.3);
            border-radius: 8px;
            padding: 0.75rem;
            margin-bottom: 0.75rem;
            border: 1px solid rgba(255,255,255,0.05);
        }
        .pih-coverage-title {
            font-size: 0.7rem;
            color: var(--text-muted);
            text-transform: uppercase;
            letter-spacing: 0.05em;
            margin-bottom: 0.5rem;
        }
        .pih-coverage-grid {
            display: grid;
            grid-template-columns: repeat(3, 1fr);
            gap: 0.5rem;
        }
        .pih-coverage-stat {
            text-align: center;
        }
        .pih-coverage-stat-value {
            font-size: 1.25rem;
            font-weight: 600;
            color: var(--gold-primary);
        }
        .pih-coverage-stat-value.green { color: #22c55e; }
        .pih-coverage-stat-value.blue { color: #60a5fa; }
        .pih-coverage-stat-label {
            font-size: 0.6rem;
            color: var(--text-muted);
        }
        .pih-contact-decision {
            display: flex;
            align-items: center;
            gap: 0.5rem;
            margin-top: 0.5rem;
            padding-top: 0.5rem;
            border-top: 1px solid rgba(255,255,255,0.05);
        }
        .pih-decision-badge {
            padding: 0.2rem 0.5rem;
            border-radius: 4px;
            font-size: 0.65rem;
            font-weight: 500;
            text-transform: uppercase;
        }
        .pih-decision-badge.approve { background: rgba(34,197,94,0.15); color: #22c55e; }
        .pih-decision-badge.review { background: rgba(245,158,11,0.15); color: #f59e0b; }
        .pih-decision-badge.skip { background: rgba(107,114,128,0.15); color: #9ca3af; }
        .pih-decision-badge.high { background: rgba(239,68,68,0.15); color: #ef4444; }
        .pih-decision-reason {
            font-size: 0.7rem;
            color: var(--text-muted);
            flex: 1;
        }
        
        /* Generated Emails */
        .pih-contact-emails {
            margin-top: 0.5rem;
            padding: 0.5rem;
            background: rgba(0,0,0,0.2);
            border-radius: 6px;
        }
        .pih-emails-label {
            font-size: 0.65rem;
            color: var(--text-muted);
            text-transform: uppercase;
            margin-bottom: 0.25rem;
        }
        .pih-email-option {
            display: flex;
            align-items: center;
            gap: 0.5rem;
            padding: 0.25rem 0;
            font-size: 0.8rem;
        }
        .pih-email-option input[type="radio"] {
            margin: 0;
        }
        .pih-email-address {
            color: var(--text-primary);
            font-family: monospace;
            font-size: 0.75rem;
        }
        .pih-email-confidence {
            font-size: 0.6rem;
            padding: 0.1rem 0.3rem;
            border-radius: 3px;
        }
        .pih-email-confidence.high { background: rgba(34,197,94,0.15); color: #22c55e; }
        .pih-email-confidence.medium { background: rgba(245,158,11,0.15); color: #f59e0b; }
        .pih-email-confidence.low { background: rgba(107,114,128,0.15); color: #9ca3af; }
        
        /* Batch State Scan Styles */
        .pih-batch-header {
            padding: 0.75rem;
            background: linear-gradient(135deg, rgba(139,92,246,0.1) 0%, rgba(59,130,246,0.1) 100%);
            border-radius: 8px;
            margin-bottom: 1rem;
        }
        .pih-batch-title {
            font-size: 0.95rem;
            font-weight: 600;
            color: var(--text-primary);
            margin-bottom: 0.25rem;
        }
        .pih-batch-subtitle {
            font-size: 0.75rem;
            color: var(--text-muted);
        }
        .pih-states-grid {
            display: grid;
            grid-template-columns: repeat(5, 1fr);
            gap: 0.25rem;
            max-height: 280px;
            overflow-y: auto;
            padding: 0.5rem;
            background: rgba(0,0,0,0.2);
            border-radius: 8px;
        }
        .pih-state-checkbox {
            display: flex;
            align-items: center;
            gap: 0.25rem;
            padding: 0.3rem 0.4rem;
            background: rgba(255,255,255,0.03);
            border: 1px solid rgba(255,255,255,0.08);
            border-radius: 4px;
            cursor: pointer;
            transition: all 0.2s ease;
            font-size: 0.7rem;
        }
        .pih-state-checkbox:hover {
            border-color: rgba(59,130,246,0.4);
            background: rgba(59,130,246,0.05);
        }
        .pih-state-checkbox.selected {
            background: rgba(59,130,246,0.15);
            border-color: rgba(59,130,246,0.4);
            color: #60a5fa;
        }
        .pih-state-checkbox input {
            margin: 0;
            width: 12px;
            height: 12px;
        }
        .pih-batch-settings {
            display: flex;
            gap: 1rem;
            margin-top: 1rem;
            padding: 0.75rem;
            background: rgba(0,0,0,0.2);
            border-radius: 8px;
        }
        .pih-batch-setting {
            flex: 1;
        }
        .pih-batch-setting label {
            display: block;
            font-size: 0.7rem;
            color: var(--text-muted);
            margin-bottom: 0.25rem;
        }
        .pih-batch-setting select {
            width: 100%;
            padding: 0.4rem;
            background: rgba(0,0,0,0.3);
            border: 1px solid rgba(255,255,255,0.1);
            border-radius: 4px;
            color: var(--text-primary);
            font-size: 0.8rem;
        }
        .pih-batch-progress {
            margin-top: 1rem;
            padding: 0.75rem;
            background: rgba(59,130,246,0.1);
            border: 1px solid rgba(59,130,246,0.3);
            border-radius: 8px;
        }
        .pih-batch-progress-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 0.5rem;
        }
        .pih-batch-progress-title {
            font-size: 0.85rem;
            font-weight: 500;
            color: var(--text-primary);
        }
        .pih-batch-cancel-btn {
            padding: 0.25rem 0.5rem;
            font-size: 0.7rem;
            background: rgba(239,68,68,0.15);
            border: 1px solid rgba(239,68,68,0.3);
            border-radius: 4px;
            color: #f87171;
            cursor: pointer;
        }
        .pih-batch-cancel-btn:hover { background: rgba(239,68,68,0.25); }
        .pih-batch-progress-bar-container {
            height: 8px;
            background: rgba(0,0,0,0.3);
            border-radius: 4px;
            overflow: hidden;
            margin-bottom: 0.5rem;
        }
        .pih-batch-progress-bar {
            height: 100%;
            background: linear-gradient(90deg, #3b82f6, #8b5cf6);
            border-radius: 4px;
            width: 0%;
            transition: width 0.3s ease;
        }
        .pih-batch-progress-stats {
            display: flex;
            justify-content: space-between;
            font-size: 0.75rem;
            color: var(--text-muted);
            margin-bottom: 0.5rem;
        }
        .pih-batch-progress-log {
            max-height: 120px;
            overflow-y: auto;
            font-size: 0.7rem;
            color: var(--text-muted);
            background: rgba(0,0,0,0.2);
            border-radius: 4px;
            padding: 0.5rem;
        }
        .pih-batch-log-entry {
            padding: 0.2rem 0;
            border-bottom: 1px solid rgba(255,255,255,0.05);
        }
        .pih-batch-log-entry.success { color: #22c55e; }
        .pih-batch-log-entry.error { color: #f87171; }
        .pih-batch-log-entry.info { color: #60a5fa; }

        .pih-discovery-field {
            margin-bottom: 1rem;
        }
        .pih-discovery-field label {
            display: block;
            font-size: 0.65rem;
            text-transform: uppercase;
            letter-spacing: 0.1em;
            color: var(--text-muted);
            margin-bottom: 0.5rem;
        }
        .pih-discovery-field input,
        .pih-discovery-field textarea,
        .pih-discovery-field select {
            width: 100%;
            background: rgba(0,0,0,0.3);
            border: 1px solid rgba(255,255,255,0.1);
            border-radius: 8px;
            padding: 0.6rem 0.8rem;
            color: var(--text-primary);
            font-size: 0.85rem;
            font-family: inherit;
        }
        .pih-discovery-field textarea {
            min-height: 80px;
            resize: vertical;
        }
        .pih-discovery-field input:focus,
        .pih-discovery-field textarea:focus {
            outline: none;
            border-color: rgba(34,197,94,0.4);
        }
        .pih-scan-btn {
            width: 100%;
            padding: 0.85rem 1.25rem;
            background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
            border: none;
            border-radius: 10px;
            color: white;
            font-size: 0.9rem;
            font-weight: 600;
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 0.6rem;
            transition: all 0.2s ease;
            margin-top: 1rem;
        }
        .pih-scan-btn:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(34,197,94,0.35); }
        .pih-scan-btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }
        .pih-scan-btn svg { width: 18px; height: 18px; }
        .pih-scan-btn.scanning {
            background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
        }
        
        /* Discovery Results */
        .pih-discovery-results {
            flex: 1;
            min-width: 450px;
            display: flex;
            flex-direction: column;
            overflow: hidden;
            background: rgba(0,0,0,0.1);
            border-right: 1px solid rgba(255,255,255,0.06);
        }
        .pih-discovery-results-header {
            padding: 1rem 1.25rem;
            border-bottom: 1px solid rgba(255,255,255,0.06);
            display: flex;
            justify-content: space-between;
            align-items: center;
        }
        .pih-discovery-results-title {
            font-size: 0.75rem;
            text-transform: uppercase;
            letter-spacing: 0.1em;
            color: var(--text-muted);
        }
        .pih-discovery-results-count {
            background: rgba(34,197,94,0.15);
            color: #22c55e;
            padding: 0.2rem 0.6rem;
            border-radius: 10px;
            font-size: 0.7rem;
        }
        .pih-discovery-results-scroll {
            flex: 1;
            overflow-y: auto;
            padding: 1rem;
        }
        .pih-discovery-empty {
            text-align: center;
            padding: 3rem 2rem;
            color: var(--text-muted);
        }
        .pih-discovery-empty svg {
            width: 48px;
            height: 48px;
            opacity: 0.3;
            margin-bottom: 1rem;
        }
        
        /* Discovered Contact Card */
        .pih-discovered-card {
            background: rgba(255,255,255,0.02);
            border: 1px solid rgba(255,255,255,0.06);
            border-radius: 12px;
            padding: 1rem;
            margin-bottom: 0.75rem;
            transition: all 0.2s ease;
        }
        .pih-discovered-card:hover {
            background: rgba(255,255,255,0.04);
            border-color: rgba(34,197,94,0.3);
        }
        .pih-discovered-card.selected {
            background: rgba(34,197,94,0.1);
            border-color: rgba(34,197,94,0.4);
        }
        .pih-discovered-header {
            display: flex;
            justify-content: space-between;
            align-items: flex-start;
            margin-bottom: 0.75rem;
        }
        .pih-discovered-name {
            font-size: 0.95rem;
            font-weight: 500;
            color: var(--text-primary);
        }
        .pih-discovered-title {
            font-size: 0.8rem;
            color: var(--text-muted);
            margin-top: 0.2rem;
        }
        .pih-discovered-type {
            font-size: 0.6rem;
            text-transform: uppercase;
            letter-spacing: 0.08em;
            padding: 0.25rem 0.6rem;
            border-radius: 12px;
            background: rgba(156,163,175,0.15);
            color: #9ca3af;
        }
        .pih-discovered-type.university { background: rgba(212,168,83,0.15); color: #D4A853; }
        .pih-discovered-type.government { background: rgba(34,197,94,0.15); color: #22c55e; }
        .pih-discovered-type.media { background: rgba(255,107,53,0.15); color: #FF6B35; }
        .pih-discovered-type.law_firm { background: rgba(245,158,11,0.15); color: #f59e0b; }
        .pih-discovered-type.corporate { background: rgba(59,130,246,0.15); color: #3b82f6; }
        .pih-discovered-org {
            font-size: 0.8rem;
            color: #60a5fa;
            margin-bottom: 0.5rem;
            display: flex;
            align-items: center;
            gap: 0.4rem;
        }
        .pih-discovered-details {
            font-size: 0.75rem;
            color: var(--text-muted);
            display: flex;
            flex-wrap: wrap;
            gap: 0.75rem;
            margin-bottom: 0.75rem;
        }
        .pih-discovered-details span {
            display: flex;
            align-items: center;
            gap: 0.3rem;
        }
        .pih-discovered-source {
            font-size: 0.7rem;
            color: var(--text-muted);
            background: rgba(0,0,0,0.2);
            padding: 0.4rem 0.6rem;
            border-radius: 6px;
            margin-bottom: 0.75rem;
        }
        .pih-discovered-actions {
            display: flex;
            gap: 0.5rem;
        }
        .pih-discovered-btn {
            flex: 1;
            padding: 0.5rem 0.75rem;
            border-radius: 6px;
            font-size: 0.75rem;
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 0.35rem;
            transition: all 0.2s ease;
        }
        .pih-discovered-btn.add {
            background: rgba(34,197,94,0.15);
            border: 1px solid rgba(34,197,94,0.3);
            color: #22c55e;
        }
        .pih-discovered-btn.add:hover { background: rgba(34,197,94,0.25); }
        .pih-discovered-btn.link {
            background: rgba(59,130,246,0.15);
            border: 1px solid rgba(59,130,246,0.3);
            color: #60a5fa;
        }
        .pih-discovered-btn.link:hover { background: rgba(59,130,246,0.25); }
        .pih-discovered-btn.message {
            background: rgba(168,85,247,0.15);
            border: 1px solid rgba(168,85,247,0.3);
            color: #c084fc;
        }
        .pih-discovered-btn.message:hover { background: rgba(168,85,247,0.25); }
        
        /* Selected Contacts Panel */
        .pih-discovery-selected {
            width: 340px;
            min-width: 340px;
            flex-shrink: 0;
            border-left: 1px solid rgba(255,255,255,0.06);
            background: rgba(0,0,0,0.2);
            display: flex;
            flex-direction: column;
            overflow: hidden;
        }
        .pih-discovery-selected-header {
            padding: 1rem 1.25rem;
            border-bottom: 1px solid rgba(255,255,255,0.06);
        }
        .pih-discovery-selected-title {
            font-size: 0.75rem;
            text-transform: uppercase;
            letter-spacing: 0.12em;
            color: #60a5fa;
            display: flex;
            align-items: center;
            gap: 0.5rem;
        }
        .pih-discovery-selected-count {
            background: rgba(59,130,246,0.2);
            padding: 0.15rem 0.5rem;
            border-radius: 10px;
            font-size: 0.65rem;
        }
        .pih-discovery-selected-scroll {
            flex: 1;
            overflow-y: auto;
            padding: 0.75rem;
        }
        .pih-discovery-selected-empty {
            text-align: center;
            padding: 2rem 1rem;
            color: var(--text-muted);
            font-size: 0.8rem;
        }
        .pih-discovery-selected-item {
            background: rgba(0,0,0,0.2);
            border: 1px solid rgba(59,130,246,0.2);
            border-radius: 8px;
            padding: 0.6rem 0.75rem;
            margin-bottom: 0.4rem;
        }
        .pih-discovery-selected-item-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 0.3rem;
        }
        .pih-discovery-selected-item-name {
            font-size: 0.8rem;
            color: var(--text-primary);
        }
        .pih-discovery-selected-item-remove {
            background: transparent;
            border: none;
            color: var(--text-muted);
            cursor: pointer;
            padding: 0.2rem;
            font-size: 1rem;
            line-height: 1;
        }
        .pih-discovery-selected-item-remove:hover { color: #ef4444; }
        .pih-discovery-selected-item-org {
            font-size: 0.7rem;
            color: var(--text-muted);
        }
        .pih-discovery-selected-actions {
            padding: 1rem;
            border-top: 1px solid rgba(255,255,255,0.06);
            display: flex;
            flex-direction: column;
            gap: 0.5rem;
        }
        .pih-discovery-action-btn {
            padding: 0.65rem 1rem;
            border-radius: 8px;
            font-size: 0.8rem;
            cursor: pointer;
            font-family: inherit;
            font-weight: 500;
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 0.5rem;
            transition: all 0.2s ease;
        }
        .pih-discovery-action-btn.add-all {
            background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
            border: none;
            color: white;
        }
        .pih-discovery-action-btn.add-all:hover { box-shadow: 0 4px 16px rgba(34,197,94,0.3); }
        .pih-discovery-action-btn.message-all {
            background: rgba(168,85,247,0.15);
            border: 1px solid rgba(168,85,247,0.3);
            color: #c084fc;
        }
        .pih-discovery-action-btn:disabled { opacity: 0.5; cursor: not-allowed; }
        
        /* ===== BATCH SCAN PANEL ===== */
        .pih-batch-panel {
            display: none;
            width: 100%;
            height: 100%;
        }
        .pih-batch-panel.active { display: flex; }
        .pih-batch-layout {
            display: flex;
            width: 100%;
            height: 100%;
        }
        .pih-batch-config {
            width: 380px;
            min-width: 380px;
            background: rgba(0,0,0,0.2);
            border-right: 1px solid rgba(255,255,255,0.05);
            display: flex;
            flex-direction: column;
            overflow-y: auto;
        }
        .pih-batch-config-header {
            padding: 1.25rem;
            border-bottom: 1px solid rgba(255,255,255,0.05);
        }
        .pih-batch-config-title {
            display: flex;
            align-items: center;
            gap: 0.5rem;
            font-family: 'Space Grotesk', sans-serif;
            font-size: 1rem;
            color: var(--text-primary);
            margin-bottom: 0.25rem;
        }
        .pih-batch-config-subtitle {
            font-size: 0.75rem;
            color: var(--text-muted);
        }
        .pih-batch-section {
            padding: 1rem 1.25rem;
            border-bottom: 1px solid rgba(255,255,255,0.03);
        }
        .pih-batch-section-title {
            display: flex;
            align-items: center;
            gap: 0.5rem;
            font-size: 0.7rem;
            text-transform: uppercase;
            letter-spacing: 0.1em;
            color: var(--text-muted);
            margin-bottom: 0.75rem;
        }
        .pih-batch-selected-count {
            margin-left: auto;
            background: rgba(139,92,246,0.15);
            color: #a78bfa;
            padding: 0.15rem 0.5rem;
            border-radius: 4px;
            font-size: 0.65rem;
        }
        .pih-batch-region-quick {
            display: flex;
            flex-wrap: wrap;
            gap: 0.25rem;
            margin-bottom: 0.75rem;
        }
        .pih-batch-region-btn {
            padding: 0.3rem 0.6rem;
            font-size: 0.7rem;
            background: rgba(255,255,255,0.03);
            border: 1px solid rgba(255,255,255,0.1);
            border-radius: 4px;
            color: var(--text-muted);
            cursor: pointer;
            transition: all 0.2s ease;
        }
        .pih-batch-region-btn:hover {
            background: rgba(139,92,246,0.1);
            border-color: rgba(139,92,246,0.3);
            color: #a78bfa;
        }
        .pih-batch-region-btn.clear {
            background: rgba(239,68,68,0.1);
            border-color: rgba(239,68,68,0.2);
            color: #f87171;
        }
        .pih-batch-states-grid {
            display: grid;
            grid-template-columns: repeat(3, 1fr);
            gap: 0.25rem;
            max-height: 280px;
            overflow-y: auto;
            padding-right: 0.25rem;
        }
        .pih-batch-states-grid::-webkit-scrollbar { width: 4px; }
        .pih-batch-states-grid::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: 2px; }
        .pih-batch-state-checkbox {
            display: flex;
            align-items: center;
            gap: 0.4rem;
            padding: 0.35rem 0.5rem;
            font-size: 0.7rem;
            background: rgba(255,255,255,0.02);
            border: 1px solid rgba(255,255,255,0.08);
            border-radius: 4px;
            color: var(--text-muted);
            cursor: pointer;
            transition: all 0.15s ease;
        }
        .pih-batch-state-checkbox:hover {
            background: rgba(139,92,246,0.1);
            border-color: rgba(139,92,246,0.3);
        }
        .pih-batch-state-checkbox.selected {
            background: rgba(139,92,246,0.2);
            border-color: rgba(139,92,246,0.5);
            color: #c084fc;
        }
        .pih-batch-state-checkbox input {
            margin: 0;
            cursor: pointer;
            width: 12px;
            height: 12px;
        }
        .pih-batch-state-code {
            font-weight: 600;
            min-width: 20px;
        }
        .pih-batch-state-name {
            font-size: 0.65rem;
            opacity: 0.7;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
        }
        .pih-batch-state-chip {
            padding: 0.35rem 0.5rem;
            font-size: 0.7rem;
            background: rgba(255,255,255,0.02);
            border: 1px solid rgba(255,255,255,0.08);
            border-radius: 4px;
            color: var(--text-muted);
            cursor: pointer;
            text-align: center;
            transition: all 0.15s ease;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
        }
        .pih-batch-state-chip:hover {
            background: rgba(139,92,246,0.1);
            border-color: rgba(139,92,246,0.3);
        }
        .pih-batch-state-chip.selected {
            background: rgba(139,92,246,0.2);
            border-color: rgba(139,92,246,0.5);
            color: #c084fc;
        }
        .pih-batch-offices {
            display: flex;
            flex-direction: column;
            gap: 0.4rem;
        }
        .pih-batch-office-check {
            display: flex;
            align-items: center;
            gap: 0.5rem;
            font-size: 0.8rem;
            color: var(--text-secondary);
            cursor: pointer;
        }
        .pih-batch-office-check input { margin: 0; cursor: pointer; }
        .pih-batch-options {
            display: flex;
            flex-direction: column;
            gap: 0.4rem;
        }
        .pih-batch-option-check {
            display: flex;
            align-items: center;
            gap: 0.5rem;
            font-size: 0.75rem;
            color: var(--text-muted);
            cursor: pointer;
        }
        .pih-batch-option-check input { margin: 0; cursor: pointer; }
        .pih-batch-input {
            width: 100%;
            padding: 0.6rem 0.8rem;
            background: rgba(0,0,0,0.3);
            border: 1px solid rgba(255,255,255,0.1);
            border-radius: 6px;
            color: var(--text-primary);
            font-size: 0.8rem;
        }
        .pih-batch-input:focus {
            outline: none;
            border-color: rgba(139,92,246,0.4);
        }
        .pih-batch-textarea {
            width: 100%;
            padding: 0.6rem 0.8rem;
            background: rgba(0,0,0,0.3);
            border: 1px solid rgba(255,255,255,0.1);
            border-radius: 6px;
            color: var(--text-primary);
            font-size: 0.8rem;
            font-family: inherit;
            resize: vertical;
            min-height: 80px;
        }
        .pih-batch-textarea:focus {
            outline: none;
            border-color: rgba(139,92,246,0.4);
        }
        .pih-batch-textarea::placeholder {
            color: var(--text-muted);
            font-size: 0.75rem;
        }
        .pih-batch-preset-btn {
            padding: 0.35rem 0.6rem;
            background: rgba(139,92,246,0.15);
            border: 1px solid rgba(139,92,246,0.3);
            border-radius: 4px;
            color: #c4b5fd;
            font-size: 0.7rem;
            cursor: pointer;
            transition: all 0.2s;
        }
        .pih-batch-preset-btn:hover {
            background: rgba(139,92,246,0.25);
            border-color: rgba(139,92,246,0.5);
        }
        .pih-batch-actions {
            padding: 1rem 1.25rem;
            margin-top: auto;
            border-top: 1px solid rgba(255,255,255,0.05);
        }
        .pih-batch-start-btn, .pih-batch-stop-btn {
            width: 100%;
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 0.5rem;
            padding: 0.75rem 1rem;
            font-size: 0.85rem;
            font-weight: 500;
            border-radius: 8px;
            cursor: pointer;
            transition: all 0.2s ease;
        }
        .pih-batch-start-btn {
            background: linear-gradient(135deg, #8b5cf6 0%, #6366f1 100%);
            border: none;
            color: white;
        }
        .pih-batch-start-btn:hover {
            transform: translateY(-1px);
            box-shadow: 0 4px 12px rgba(139,92,246,0.3);
        }
        .pih-batch-start-btn:disabled {
            opacity: 0.5;
            cursor: not-allowed;
            transform: none;
            box-shadow: none;
        }
        .pih-batch-stop-btn {
            background: rgba(239,68,68,0.15);
            border: 1px solid rgba(239,68,68,0.3);
            color: #f87171;
        }
        .pih-batch-stop-btn:hover {
            background: rgba(239,68,68,0.25);
        }
        
        /* Batch Results */
        .pih-batch-results {
            flex: 1;
            display: flex;
            flex-direction: column;
            overflow: hidden;
        }
        .pih-batch-results-header {
            display: flex;
            align-items: center;
            justify-content: space-between;
            padding: 1rem 1.25rem;
            border-bottom: 1px solid rgba(255,255,255,0.05);
            background: rgba(0,0,0,0.1);
        }
        .pih-batch-results-title {
            font-family: 'Space Grotesk', sans-serif;
            font-size: 0.9rem;
            color: var(--text-primary);
        }
        .pih-batch-results-stats {
            display: flex;
            gap: 1rem;
            font-size: 0.75rem;
            color: var(--text-muted);
        }
        .pih-batch-results-stats span {
            padding: 0.25rem 0.5rem;
            background: rgba(255,255,255,0.03);
            border-radius: 4px;
        }
        .pih-batch-progress-section {
            flex: 1;
            overflow-y: auto;
            padding: 1rem;
        }
        .pih-batch-progress-empty {
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            height: 100%;
            color: var(--text-muted);
            text-align: center;
        }
        .pih-batch-progress-empty svg {
            opacity: 0.3;
            margin-bottom: 1rem;
        }
        .pih-batch-state-cards {
            display: grid;
            grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
            gap: 0.75rem;
            padding: 1rem;
            overflow-y: auto;
        }
        .pih-batch-state-card {
            background: rgba(0,0,0,0.2);
            border: 1px solid rgba(255,255,255,0.05);
            border-radius: 10px;
            overflow: hidden;
        }
        .pih-batch-state-card.scanning {
            border-color: rgba(139,92,246,0.3);
            animation: pulseBorder 2s ease-in-out infinite;
        }
        .pih-batch-state-card.complete {
            border-color: rgba(34,197,94,0.3);
        }
        .pih-batch-state-card.error {
            border-color: rgba(239,68,68,0.3);
        }
        @keyframes pulseBorder {
            0%, 100% { box-shadow: 0 0 0 0 rgba(139,92,246,0.2); }
            50% { box-shadow: 0 0 0 4px rgba(139,92,246,0.1); }
        }
        .pih-batch-state-card-header {
            display: flex;
            align-items: center;
            justify-content: space-between;
            padding: 0.75rem 1rem;
            background: rgba(255,255,255,0.02);
            border-bottom: 1px solid rgba(255,255,255,0.03);
        }
        .pih-batch-state-card-name {
            font-weight: 500;
            color: var(--text-primary);
        }
        .pih-batch-state-card-status {
            font-size: 0.7rem;
            padding: 0.2rem 0.5rem;
            border-radius: 4px;
        }
        .pih-batch-state-card-status.pending {
            background: rgba(255,255,255,0.05);
            color: var(--text-muted);
        }
        .pih-batch-state-card-status.scanning {
            background: rgba(139,92,246,0.15);
            color: #a78bfa;
            animation: pulse 1.5s ease-in-out infinite;
        }
        .pih-batch-state-card-status.complete {
            background: rgba(34,197,94,0.15);
            color: #22c55e;
        }
        .pih-batch-state-card-status.error {
            background: rgba(239,68,68,0.15);
            color: #f87171;
        }
        .pih-batch-state-card-body {
            padding: 0.75rem 1rem;
        }
        .pih-batch-state-card-progress {
            height: 4px;
            background: rgba(255,255,255,0.05);
            border-radius: 2px;
            overflow: hidden;
            margin-bottom: 0.5rem;
        }
        .pih-batch-state-card-progress-bar {
            height: 100%;
            background: linear-gradient(90deg, #8b5cf6, #6366f1);
            border-radius: 2px;
            transition: width 0.3s ease;
        }
        .pih-batch-state-card-stats {
            display: flex;
            justify-content: space-between;
            font-size: 0.75rem;
            color: var(--text-muted);
        }
        
        /* Aggregated Results */
        .pih-batch-aggregated {
            flex: 1;
            display: flex;
            flex-direction: column;
            overflow: hidden;
        }
        .pih-batch-aggregated-header {
            display: flex;
            align-items: center;
            justify-content: space-between;
            padding: 0.75rem 1rem;
            background: rgba(139,92,246,0.1);
            border-bottom: 1px solid rgba(139,92,246,0.2);
        }
        .pih-batch-aggregated-header span {
            font-weight: 500;
            color: var(--text-primary);
        }
        .pih-batch-aggregated-actions {
            display: flex;
            gap: 0.5rem;
        }
        .pih-batch-agg-btn {
            padding: 0.4rem 0.75rem;
            font-size: 0.75rem;
            background: rgba(255,255,255,0.05);
            border: 1px solid rgba(255,255,255,0.1);
            border-radius: 4px;
            color: var(--text-secondary);
            cursor: pointer;
            transition: all 0.2s ease;
        }
        .pih-batch-agg-btn:hover {
            background: rgba(255,255,255,0.1);
        }
        .pih-batch-agg-btn.primary {
            background: rgba(34,197,94,0.15);
            border-color: rgba(34,197,94,0.3);
            color: #22c55e;
        }
        .pih-batch-contacts-list {
            flex: 1;
            overflow-y: auto;
            padding: 0.5rem;
        }
        .pih-batch-contact-item {
            display: flex;
            align-items: center;
            gap: 0.75rem;
            padding: 0.6rem 0.75rem;
            background: rgba(0,0,0,0.2);
            border: 1px solid rgba(255,255,255,0.05);
            border-radius: 6px;
            margin-bottom: 0.4rem;
            cursor: pointer;
            transition: all 0.15s ease;
        }
        .pih-batch-contact-item:hover {
            background: rgba(0,0,0,0.3);
            border-color: rgba(255,255,255,0.1);
        }
        .pih-batch-contact-item.selected {
            background: rgba(139,92,246,0.1);
            border-color: rgba(139,92,246,0.3);
        }
        .pih-batch-contact-item input[type="checkbox"] {
            margin: 0;
        }
        .pih-batch-contact-info {
            flex: 1;
            min-width: 0;
        }
        .pih-batch-contact-name {
            font-size: 0.85rem;
            color: var(--text-primary);
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
        }
        .pih-batch-contact-meta {
            font-size: 0.7rem;
            color: var(--text-muted);
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
        }
        .pih-batch-contact-state {
            font-size: 0.65rem;
            padding: 0.15rem 0.4rem;
            background: rgba(255,255,255,0.05);
            border-radius: 3px;
            color: var(--text-muted);
        }
        .pih-batch-contact-decision {
            font-size: 0.65rem;
            padding: 0.15rem 0.4rem;
            border-radius: 3px;
        }
        .pih-batch-contact-decision.approve {
            background: rgba(34,197,94,0.15);
            color: #22c55e;
        }
        .pih-batch-contact-decision.review {
            background: rgba(245,158,11,0.15);
            color: #f59e0b;
        }
        
        /* ===== CONTINUOUS SCANNER PANEL ===== */
        .pih-scanner-panel {
            display: flex;
            flex-direction: column;
            width: 100%;
            padding: 2rem;
            overflow-y: auto;
        }
        .pih-scanner-hero {
            text-align: center;
            max-width: 700px;
            margin: 0 auto 2rem;
        }
        .pih-scanner-hero h2 {
            font-family: 'Space Grotesk', sans-serif;
            font-size: 1.75rem;
            color: var(--text-primary);
            margin-bottom: 1rem;
        }
        .pih-scanner-hero p {
            color: var(--text-muted);
            line-height: 1.7;
        }
        .pih-scanner-grid {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
            gap: 1.5rem;
            max-width: 1200px;
            margin: 0 auto;
        }
        .pih-scanner-card {
            background: rgba(255,255,255,0.02);
            border: 1px solid rgba(255,255,255,0.08);
            border-radius: 16px;
            padding: 1.5rem;
            transition: all 0.2s ease;
        }
        .pih-scanner-card:hover {
            background: rgba(255,255,255,0.04);
            border-color: rgba(255,255,255,0.12);
        }
        .pih-scanner-card-header {
            display: flex;
            justify-content: space-between;
            align-items: flex-start;
            margin-bottom: 1rem;
        }
        .pih-scanner-card-icon {
            width: 48px;
            height: 48px;
            border-radius: 12px;
            display: flex;
            align-items: center;
            justify-content: center;
        }
        .pih-scanner-card-icon.gov { background: rgba(34,197,94,0.15); color: #22c55e; }
        .pih-scanner-card-icon.uni { background: rgba(212,168,83,0.15); color: #D4A853; }
        .pih-scanner-card-icon.media { background: rgba(255,107,53,0.15); color: #FF6B35; }
        .pih-scanner-card-icon.enterprise { background: rgba(59,130,246,0.15); color: #3b82f6; }
        .pih-scanner-card-icon svg { width: 24px; height: 24px; }
        .pih-scanner-card-status {
            display: flex;
            align-items: center;
            gap: 0.4rem;
            font-size: 0.7rem;
            padding: 0.3rem 0.6rem;
            border-radius: 12px;
        }
        .pih-scanner-card-status.active {
            background: rgba(34,197,94,0.15);
            color: #22c55e;
        }
        .pih-scanner-card-status.active::before {
            content: '';
            width: 6px;
            height: 6px;
            border-radius: 50%;
            background: #22c55e;
            animation: pulse 2s infinite;
        }
        .pih-scanner-card-status.paused {
            background: rgba(251,191,36,0.15);
            color: #fbbf24;
        }
        .pih-scanner-card-status.inactive {
            background: rgba(156,163,175,0.15);
            color: #9ca3af;
        }
        @keyframes pulse {
            0%, 100% { opacity: 1; }
            50% { opacity: 0.4; }
        }
        .pih-scanner-card-title {
            font-size: 1.1rem;
            font-weight: 500;
            color: var(--text-primary);
            margin-bottom: 0.5rem;
        }
        .pih-scanner-card-desc {
            font-size: 0.85rem;
            color: var(--text-muted);
            line-height: 1.6;
            margin-bottom: 1rem;
        }
        .pih-scanner-card-stats {
            display: grid;
            grid-template-columns: repeat(3, 1fr);
            gap: 0.75rem;
            margin-bottom: 1rem;
            padding: 0.75rem;
            background: rgba(0,0,0,0.2);
            border-radius: 10px;
        }
        .pih-scanner-stat {
            text-align: center;
        }
        .pih-scanner-stat-value {
            font-size: 1.25rem;
            font-weight: 600;
            color: var(--gold-primary);
        }
        .pih-scanner-stat-label {
            font-size: 0.6rem;
            color: var(--text-muted);
            text-transform: uppercase;
        }
        .pih-scanner-card-actions {
            display: flex;
            gap: 0.5rem;
        }
        .pih-scanner-toggle {
            flex: 1;
            padding: 0.6rem 1rem;
            border-radius: 8px;
            font-size: 0.8rem;
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 0.4rem;
            transition: all 0.2s ease;
        }
        .pih-scanner-toggle.start {
            background: rgba(34,197,94,0.15);
            border: 1px solid rgba(34,197,94,0.3);
            color: #22c55e;
        }
        .pih-scanner-toggle.stop {
            background: rgba(239,68,68,0.15);
            border: 1px solid rgba(239,68,68,0.3);
            color: #ef4444;
        }
        .pih-scanner-toggle.configure {
            background: rgba(255,255,255,0.03);
            border: 1px solid rgba(255,255,255,0.1);
            color: var(--text-secondary);
        }
        
        /* ===== ENHANCED SCANNER LAYOUT ===== */
        .pih-scanner-panel {
            display: flex;
            flex-direction: column;
            width: 100%;
            overflow: hidden;
        }
        .pih-scanner-layout {
            display: flex;
            flex: 1;
            overflow-x: auto;
            overflow-y: hidden;
            scroll-behavior: smooth;
            scrollbar-width: thin;
            scrollbar-color: rgba(255,255,255,0.2) transparent;
        }
        .pih-scanner-layout::-webkit-scrollbar {
            height: 8px;
        }
        .pih-scanner-layout::-webkit-scrollbar-track {
            background: transparent;
        }
        .pih-scanner-layout::-webkit-scrollbar-thumb {
            background: rgba(255,255,255,0.15);
            border-radius: 4px;
        }
        
        /* Scanner Controls Left Panel */
        .pih-scanner-controls {
            width: 360px;
            min-width: 360px;
            flex-shrink: 0;
            background: rgba(0,0,0,0.2);
            border-right: 1px solid rgba(255,255,255,0.06);
            display: flex;
            flex-direction: column;
            overflow: hidden;
        }
        .pih-scanner-controls-header {
            padding: 1.25rem;
            border-bottom: 1px solid rgba(255,255,255,0.06);
        }
        .pih-scanner-controls-title {
            font-family: 'Space Grotesk', sans-serif;
            font-size: 1rem;
            color: var(--text-primary);
            margin-bottom: 0.5rem;
        }
        .pih-scanner-controls-subtitle {
            font-size: 0.8rem;
            color: var(--text-muted);
        }
        .pih-scanner-controls-scroll {
            flex: 1;
            overflow-y: auto;
            padding: 1rem;
        }
        
        /* Mini Scanner Cards */
        .pih-scanner-mini {
            background: rgba(255,255,255,0.02);
            border: 1px solid rgba(255,255,255,0.06);
            border-radius: 12px;
            padding: 1rem;
            margin-bottom: 0.75rem;
            transition: all 0.2s ease;
        }
        .pih-scanner-mini:hover {
            background: rgba(255,255,255,0.04);
            border-color: rgba(255,255,255,0.1);
        }
        .pih-scanner-mini.active {
            border-color: rgba(34,197,94,0.4);
            background: rgba(34,197,94,0.05);
        }
        .pih-scanner-mini-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 0.75rem;
        }
        .pih-scanner-mini-title {
            display: flex;
            align-items: center;
            gap: 0.5rem;
            font-size: 0.9rem;
            font-weight: 500;
        }
        .pih-scanner-mini-icon {
            width: 28px;
            height: 28px;
            border-radius: 6px;
            display: flex;
            align-items: center;
            justify-content: center;
        }
        .pih-scanner-mini-icon.gov { background: rgba(34,197,94,0.15); color: #22c55e; }
        .pih-scanner-mini-icon.uni { background: rgba(212,168,83,0.15); color: #D4A853; }
        .pih-scanner-mini-icon.media { background: rgba(255,107,53,0.15); color: #FF6B35; }
        .pih-scanner-mini-icon.ent { background: rgba(59,130,246,0.15); color: #3b82f6; }
        .pih-scanner-mini-icon svg { width: 16px; height: 16px; }
        .pih-scanner-mini-status {
            font-size: 0.65rem;
            padding: 0.2rem 0.5rem;
            border-radius: 10px;
            display: flex;
            align-items: center;
            gap: 0.3rem;
        }
        .pih-scanner-mini-status.active {
            background: rgba(34,197,94,0.15);
            color: #22c55e;
        }
        .pih-scanner-mini-status.active::before {
            content: '';
            width: 6px;
            height: 6px;
            border-radius: 50%;
            background: #22c55e;
            animation: pulse 2s infinite;
        }
        .pih-scanner-mini-status.inactive {
            background: rgba(156,163,175,0.15);
            color: #9ca3af;
        }
        .pih-scanner-mini-stats {
            display: flex;
            gap: 1rem;
            margin-bottom: 0.75rem;
            font-size: 0.75rem;
        }
        .pih-scanner-mini-stat {
            color: var(--text-muted);
        }
        .pih-scanner-mini-stat strong {
            color: var(--gold-primary);
            margin-right: 0.25rem;
        }
        .pih-scanner-mini-actions {
            display: flex;
            gap: 0.5rem;
        }
        .pih-scanner-mini-btn {
            flex: 1;
            padding: 0.5rem 0.75rem;
            border-radius: 6px;
            font-size: 0.75rem;
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 0.35rem;
            transition: all 0.2s ease;
            font-family: inherit;
        }
        .pih-scanner-mini-btn.start {
            background: rgba(34,197,94,0.15);
            border: 1px solid rgba(34,197,94,0.3);
            color: #22c55e;
        }
        .pih-scanner-mini-btn.stop {
            background: rgba(239,68,68,0.15);
            border: 1px solid rgba(239,68,68,0.3);
            color: #ef4444;
        }
        .pih-scanner-mini-btn.config {
            background: rgba(255,255,255,0.03);
            border: 1px solid rgba(255,255,255,0.1);
            color: var(--text-secondary);
        }
        .pih-scanner-mini-btn:hover { opacity: 0.9; transform: translateY(-1px); }
        
        /* Live Feed Right Panel */
        .pih-scanner-feed {
            flex: 1;
            min-width: 450px;
            display: flex;
            flex-direction: column;
            overflow: hidden;
            background: linear-gradient(180deg, rgba(34,197,94,0.03) 0%, rgba(0,0,0,0.1) 100%);
        }
        .pih-feed-header {
            padding: 1rem 1.25rem;
            border-bottom: 1px solid rgba(34,197,94,0.2);
            display: flex;
            justify-content: space-between;
            align-items: center;
            background: rgba(34,197,94,0.05);
        }
        .pih-feed-title {
            display: flex;
            align-items: center;
            gap: 0.6rem;
            font-size: 0.85rem;
            color: #22c55e;
            font-weight: 500;
        }
        .pih-feed-title svg { width: 18px; height: 18px; }
        .pih-feed-live {
            display: flex;
            align-items: center;
            gap: 0.4rem;
            font-size: 0.7rem;
            color: #22c55e;
            background: rgba(34,197,94,0.15);
            padding: 0.3rem 0.6rem;
            border-radius: 12px;
        }
        .pih-feed-live-dot {
            width: 8px;
            height: 8px;
            border-radius: 50%;
            background: #22c55e;
            animation: pulse 1.5s infinite;
        }
        .pih-feed-stats {
            display: flex;
            gap: 1.5rem;
            padding: 0.75rem 1.25rem;
            background: rgba(0,0,0,0.2);
            border-bottom: 1px solid rgba(255,255,255,0.04);
        }
        .pih-feed-stat {
            text-align: center;
        }
        .pih-feed-stat-value {
            font-size: 1.5rem;
            font-weight: 600;
            color: var(--gold-primary);
        }
        .pih-feed-stat-label {
            font-size: 0.65rem;
            color: var(--text-muted);
            text-transform: uppercase;
        }
        .pih-feed-scroll {
            flex: 1;
            overflow-y: auto;
            padding: 1rem;
        }
        .pih-feed-empty {
            text-align: center;
            padding: 3rem 2rem;
            color: var(--text-muted);
        }
        .pih-feed-empty svg {
            width: 48px;
            height: 48px;
            opacity: 0.3;
            margin-bottom: 1rem;
        }
        
        /* Live Contact Card */
        .pih-live-card {
            background: rgba(255,255,255,0.03);
            border: 1px solid rgba(255,255,255,0.08);
            border-radius: 12px;
            padding: 1rem 1.25rem;
            margin-bottom: 0.75rem;
            animation: slideInFade 0.4s ease;
            transition: all 0.2s ease;
        }
        @keyframes slideInFade {
            from { opacity: 0; transform: translateY(-10px); }
            to { opacity: 1; transform: translateY(0); }
        }
        .pih-live-card:hover {
            background: rgba(255,255,255,0.05);
            border-color: rgba(255,255,255,0.12);
        }
        .pih-live-card.new {
            border-color: rgba(34,197,94,0.4);
            background: rgba(34,197,94,0.08);
        }
        .pih-live-card-header {
            display: flex;
            justify-content: space-between;
            align-items: flex-start;
            margin-bottom: 0.75rem;
        }
        .pih-live-card-source {
            display: flex;
            align-items: center;
            gap: 0.4rem;
            font-size: 0.65rem;
            color: var(--text-muted);
        }
        .pih-live-card-source-icon {
            width: 20px;
            height: 20px;
            border-radius: 4px;
            display: flex;
            align-items: center;
            justify-content: center;
        }
        .pih-live-card-source-icon.gov { background: rgba(34,197,94,0.15); color: #22c55e; }
        .pih-live-card-source-icon.uni { background: rgba(212,168,83,0.15); color: #D4A853; }
        .pih-live-card-source-icon.media { background: rgba(255,107,53,0.15); color: #FF6B35; }
        .pih-live-card-source-icon.ent { background: rgba(59,130,246,0.15); color: #3b82f6; }
        .pih-live-card-source-icon svg { width: 12px; height: 12px; }
        .pih-live-card-time {
            font-size: 0.65rem;
            color: var(--text-muted);
        }
        .pih-live-card-main {
            margin-bottom: 0.75rem;
        }
        .pih-live-card-name {
            font-size: 1rem;
            font-weight: 500;
            color: var(--text-primary);
            margin-bottom: 0.25rem;
        }
        .pih-live-card-title {
            font-size: 0.85rem;
            color: #60a5fa;
            margin-bottom: 0.35rem;
        }
        .pih-live-card-org {
            font-size: 0.8rem;
            color: var(--text-muted);
            display: flex;
            align-items: center;
            gap: 0.35rem;
        }
        .pih-live-card-details {
            display: grid;
            grid-template-columns: repeat(2, 1fr);
            gap: 0.5rem;
            margin-bottom: 0.75rem;
            padding: 0.75rem;
            background: rgba(0,0,0,0.2);
            border-radius: 8px;
        }
        .pih-live-card-detail {
            font-size: 0.75rem;
        }
        .pih-live-card-detail-label {
            color: var(--text-muted);
            font-size: 0.65rem;
            text-transform: uppercase;
            margin-bottom: 0.2rem;
        }
        .pih-live-card-detail-value {
            color: var(--text-secondary);
        }
        .pih-live-card-detail-value a {
            color: #60a5fa;
            text-decoration: none;
        }
        .pih-live-card-intel {
            font-size: 0.75rem;
            color: var(--text-muted);
            background: rgba(212,168,85,0.08);
            border: 1px solid rgba(212,168,85,0.15);
            border-radius: 6px;
            padding: 0.6rem 0.75rem;
            margin-bottom: 0.75rem;
        }
        .pih-live-card-intel-label {
            color: var(--gold-primary);
            font-size: 0.65rem;
            text-transform: uppercase;
            margin-bottom: 0.3rem;
            display: flex;
            align-items: center;
            gap: 0.3rem;
        }
        .pih-live-card-actions {
            display: flex;
            gap: 0.5rem;
        }
        .pih-live-card-btn {
            flex: 1;
            padding: 0.6rem 0.75rem;
            border-radius: 8px;
            font-size: 0.8rem;
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 0.4rem;
            transition: all 0.2s ease;
            font-family: inherit;
            font-weight: 500;
        }
        .pih-live-card-btn.add {
            background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
            border: none;
            color: white;
        }
        .pih-live-card-btn.add:hover { box-shadow: 0 4px 12px rgba(34,197,94,0.3); }
        .pih-live-card-btn.dismiss {
            background: rgba(255,255,255,0.03);
            border: 1px solid rgba(255,255,255,0.1);
            color: var(--text-muted);
        }
        .pih-live-card-btn.dismiss:hover { background: rgba(239,68,68,0.1); border-color: rgba(239,68,68,0.3); color: #ef4444; }
        .pih-live-card-btn.view {
            background: rgba(59,130,246,0.15);
            border: 1px solid rgba(59,130,246,0.3);
            color: #60a5fa;
        }
        
        /* Scanner Configuration Modal */
        .pih-config-modal {
            position: fixed;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background: rgba(0,0,0,0.85);
            backdrop-filter: blur(8px);
            z-index: 10001;
            display: none;
            align-items: center;
            justify-content: center;
        }
        .pih-config-modal.active { display: flex; }
        .pih-config-content {
            background: linear-gradient(145deg, #1a1a24 0%, #12121a 100%);
            border: 1px solid rgba(255,255,255,0.1);
            border-radius: 20px;
            width: 600px;
            max-height: 85vh;
            overflow: hidden;
            display: flex;
            flex-direction: column;
            box-shadow: 0 24px 80px rgba(0,0,0,0.5);
        }
        .pih-config-header {
            padding: 1.5rem;
            border-bottom: 1px solid rgba(255,255,255,0.08);
            display: flex;
            justify-content: space-between;
            align-items: center;
        }
        .pih-config-title {
            display: flex;
            align-items: center;
            gap: 0.75rem;
        }
        .pih-config-title-icon {
            width: 40px;
            height: 40px;
            border-radius: 10px;
            display: flex;
            align-items: center;
            justify-content: center;
        }
        .pih-config-title-icon svg { width: 22px; height: 22px; }
        .pih-config-title h3 {
            font-size: 1.1rem;
            font-weight: 500;
            margin-bottom: 0.2rem;
        }
        .pih-config-title p {
            font-size: 0.8rem;
            color: var(--text-muted);
        }
        .pih-config-close {
            background: transparent;
            border: none;
            color: var(--text-muted);
            cursor: pointer;
            padding: 0.5rem;
            border-radius: 6px;
        }
        .pih-config-close:hover { background: rgba(255,255,255,0.05); color: var(--text-primary); }
        .pih-config-body {
            flex: 1;
            overflow-y: auto;
            padding: 1.5rem;
        }
        .pih-config-section {
            margin-bottom: 1.5rem;
        }
        .pih-config-label {
            font-size: 0.7rem;
            text-transform: uppercase;
            letter-spacing: 0.1em;
            color: var(--text-muted);
            margin-bottom: 0.6rem;
            display: flex;
            align-items: center;
            gap: 0.4rem;
        }
        .pih-config-field {
            margin-bottom: 1rem;
        }
        .pih-config-field label {
            display: block;
            font-size: 0.8rem;
            color: var(--text-secondary);
            margin-bottom: 0.4rem;
        }
        .pih-config-field input,
        .pih-config-field textarea,
        .pih-config-field select {
            width: 100%;
            background: rgba(0,0,0,0.3);
            border: 1px solid rgba(255,255,255,0.1);
            border-radius: 8px;
            padding: 0.7rem 0.9rem;
            color: var(--text-primary);
            font-size: 0.9rem;
            font-family: inherit;
        }
        .pih-config-field input:focus,
        .pih-config-field textarea:focus {
            outline: none;
            border-color: rgba(34,197,94,0.4);
        }
        .pih-config-field textarea {
            min-height: 80px;
            resize: vertical;
        }
        .pih-config-chips {
            display: flex;
            flex-wrap: wrap;
            gap: 0.4rem;
        }
        .pih-config-chip {
            background: rgba(255,255,255,0.03);
            border: 1px solid rgba(255,255,255,0.08);
            border-radius: 16px;
            padding: 0.4rem 0.8rem;
            font-size: 0.8rem;
            color: var(--text-secondary);
            cursor: pointer;
            transition: all 0.2s ease;
        }
        .pih-config-chip:hover { border-color: rgba(34,197,94,0.4); }
        .pih-config-chip.active {
            background: rgba(34,197,94,0.15);
            border-color: rgba(34,197,94,0.4);
            color: #22c55e;
        }
        .pih-config-toggle {
            display: flex;
            align-items: center;
            justify-content: space-between;
            padding: 0.75rem 1rem;
            background: rgba(0,0,0,0.2);
            border-radius: 8px;
            margin-bottom: 0.5rem;
        }
        .pih-config-toggle-info {
            flex: 1;
        }
        .pih-config-toggle-title {
            font-size: 0.85rem;
            color: var(--text-primary);
            margin-bottom: 0.2rem;
        }
        .pih-config-toggle-desc {
            font-size: 0.75rem;
            color: var(--text-muted);
        }
        .pih-config-switch {
            position: relative;
            width: 44px;
            height: 24px;
            background: rgba(255,255,255,0.1);
            border-radius: 12px;
            cursor: pointer;
            transition: all 0.2s ease;
        }
        .pih-config-switch.on { background: #22c55e; }
        .pih-config-switch::after {
            content: '';
            position: absolute;
            top: 2px;
            left: 2px;
            width: 20px;
            height: 20px;
            background: white;
            border-radius: 50%;
            transition: all 0.2s ease;
        }
        .pih-config-switch.on::after { left: 22px; }
        .pih-config-footer {
            padding: 1.25rem 1.5rem;
            border-top: 1px solid rgba(255,255,255,0.08);
            display: flex;
            gap: 0.75rem;
            justify-content: flex-end;
        }
        .pih-config-btn {
            padding: 0.7rem 1.5rem;
            border-radius: 8px;
            font-size: 0.85rem;
            cursor: pointer;
            font-family: inherit;
            font-weight: 500;
            transition: all 0.2s ease;
        }
        .pih-config-btn.cancel {
            background: rgba(255,255,255,0.03);
            border: 1px solid rgba(255,255,255,0.1);
            color: var(--text-secondary);
        }
        .pih-config-btn.save {
            background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
            border: none;
            color: white;
        }
        .pih-config-btn.save:hover { box-shadow: 0 4px 16px rgba(34,197,94,0.3); }
        
        /* ===== UNIFIED PARTNER SELECTOR ===== */
        .ups-trigger {
            display: flex;
            align-items: center;
            gap: 0.75rem;
            padding: 0.65rem 1rem;
            background: rgba(0,0,0,0.3);
            border: 1px solid rgba(255,255,255,0.1);
            border-radius: 10px;
            cursor: pointer;
            transition: all 0.2s ease;
            min-width: 280px;
            max-width: 100%;
        }
        .ups-trigger:hover {
            border-color: rgba(212,168,85,0.4);
            background: rgba(0,0,0,0.4);
        }
        .ups-trigger.has-selection {
            border-color: rgba(34,197,94,0.4);
            background: rgba(34,197,94,0.05);
        }
        .ups-trigger-icon {
            width: 32px;
            height: 32px;
            border-radius: 8px;
            display: flex;
            align-items: center;
            justify-content: center;
            flex-shrink: 0;
        }
        .ups-trigger-icon.empty {
            background: rgba(255,255,255,0.05);
            color: var(--text-muted);
        }
        .ups-trigger-icon.university { background: rgba(168,85,247,0.15); color: #c084fc; }
        .ups-trigger-icon.media { background: rgba(59,130,246,0.15); color: #60a5fa; }
        .ups-trigger-icon.government { background: rgba(34,197,94,0.15); color: #22c55e; }
        .ups-trigger-icon.enterprise { background: rgba(251,191,36,0.15); color: #fbbf24; }
        .ups-trigger-icon svg { width: 18px; height: 18px; }
        .ups-trigger-content {
            flex: 1;
            min-width: 0;
            text-align: left;
        }
        .ups-trigger-label {
            font-size: 0.85rem;
            color: var(--text-muted);
        }
        .ups-trigger-value {
            font-size: 0.9rem;
            color: var(--text-primary);
            font-weight: 500;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
        }
        .ups-trigger-org {
            font-size: 0.75rem;
            color: var(--text-muted);
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
        }
        .ups-trigger-chevron {
            color: var(--text-muted);
            flex-shrink: 0;
            transition: transform 0.2s ease;
        }
        .ups-trigger.open .ups-trigger-chevron {
            transform: rotate(180deg);
        }
        
        /* Unified Partner Selector Modal */
        .ups-modal {
            position: fixed;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background: rgba(0,0,0,0.8);
            backdrop-filter: blur(8px);
            z-index: 10002;
            display: none;
            align-items: flex-start;
            justify-content: center;
            padding-top: 10vh;
        }
        .ups-modal.active { display: flex; }
        .ups-container {
            background: linear-gradient(145deg, #1e1e2a 0%, #14141c 100%);
            border: 1px solid rgba(255,255,255,0.1);
            border-radius: 16px;
            width: 560px;
            max-height: 70vh;
            display: flex;
            flex-direction: column;
            box-shadow: 0 24px 80px rgba(0,0,0,0.5);
            overflow: hidden;
        }
        .ups-header {
            padding: 1.25rem;
            border-bottom: 1px solid rgba(255,255,255,0.06);
        }
        .ups-search-wrapper {
            position: relative;
        }
        .ups-search-icon {
            position: absolute;
            left: 1rem;
            top: 50%;
            transform: translateY(-50%);
            color: var(--text-muted);
            pointer-events: none;
        }
        .ups-search {
            width: 100%;
            padding: 0.85rem 1rem 0.85rem 2.75rem;
            background: rgba(0,0,0,0.3);
            border: 1px solid rgba(255,255,255,0.1);
            border-radius: 10px;
            color: var(--text-primary);
            font-size: 0.95rem;
            font-family: inherit;
        }
        .ups-search:focus {
            outline: none;
            border-color: rgba(212,168,85,0.4);
            box-shadow: 0 0 0 3px rgba(212,168,85,0.1);
        }
        .ups-search::placeholder { color: var(--text-muted); }
        .ups-filters {
            display: flex;
            gap: 0.5rem;
            margin-top: 0.75rem;
            flex-wrap: wrap;
        }
        .ups-filter {
            padding: 0.4rem 0.75rem;
            background: rgba(255,255,255,0.03);
            border: 1px solid rgba(255,255,255,0.08);
            border-radius: 16px;
            font-size: 0.75rem;
            color: var(--text-secondary);
            cursor: pointer;
            transition: all 0.2s ease;
            display: flex;
            align-items: center;
            gap: 0.35rem;
        }
        .ups-filter:hover { border-color: rgba(255,255,255,0.2); }
        .ups-filter.active {
            background: rgba(212,168,85,0.15);
            border-color: rgba(212,168,85,0.4);
            color: var(--gold-primary);
        }
        .ups-body {
            flex: 1;
            overflow-y: auto;
            padding: 0.5rem;
        }
        .ups-section {
            margin-bottom: 0.5rem;
        }
        .ups-section-title {
            font-size: 0.65rem;
            text-transform: uppercase;
            letter-spacing: 0.1em;
            color: var(--text-muted);
            padding: 0.5rem 0.75rem;
            display: flex;
            align-items: center;
            gap: 0.4rem;
        }
        .ups-item {
            display: flex;
            align-items: center;
            gap: 0.75rem;
            padding: 0.75rem;
            border-radius: 10px;
            cursor: pointer;
            transition: all 0.15s ease;
        }
        .ups-item:hover {
            background: rgba(255,255,255,0.05);
        }
        .ups-item.selected {
            background: rgba(212,168,85,0.1);
            border: 1px solid rgba(212,168,85,0.3);
        }
        .ups-item-icon {
            width: 40px;
            height: 40px;
            border-radius: 10px;
            display: flex;
            align-items: center;
            justify-content: center;
            flex-shrink: 0;
        }
        .ups-item-icon.university { background: rgba(168,85,247,0.15); color: #c084fc; }
        .ups-item-icon.media { background: rgba(59,130,246,0.15); color: #60a5fa; }
        .ups-item-icon.government { background: rgba(34,197,94,0.15); color: #22c55e; }
        .ups-item-icon.enterprise { background: rgba(251,191,36,0.15); color: #fbbf24; }
        .ups-item-icon svg { width: 20px; height: 20px; }
        .ups-item-content {
            flex: 1;
            min-width: 0;
        }
        .ups-item-name {
            font-size: 0.9rem;
            color: var(--text-primary);
            font-weight: 500;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
        }
        .ups-item-org {
            font-size: 0.8rem;
            color: var(--text-muted);
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
        }
        .ups-item-meta {
            display: flex;
            align-items: center;
            gap: 0.75rem;
            flex-shrink: 0;
        }
        .ups-item-research {
            display: flex;
            gap: 2px;
        }
        .ups-item-research-dot {
            width: 5px;
            height: 5px;
            border-radius: 50%;
            background: rgba(255,255,255,0.1);
        }
        .ups-item-research-dot.filled {
            background: #22c55e;
        }
        .ups-item-status {
            font-size: 0.65rem;
            padding: 0.2rem 0.5rem;
            border-radius: 8px;
            text-transform: capitalize;
        }
        .ups-item-status.pending { background: rgba(156,163,175,0.15); color: #9ca3af; }
        .ups-item-status.viewed { background: rgba(59,130,246,0.15); color: #60a5fa; }
        .ups-item-status.responded { background: rgba(168,85,247,0.15); color: #c084fc; }
        .ups-item-status.accepted { background: rgba(34,197,94,0.15); color: #22c55e; }
        .ups-empty {
            text-align: center;
            padding: 2rem;
            color: var(--text-muted);
        }
        .ups-empty svg {
            width: 40px;
            height: 40px;
            opacity: 0.3;
            margin-bottom: 0.75rem;
        }
        .ups-footer {
            padding: 1rem 1.25rem;
            border-top: 1px solid rgba(255,255,255,0.06);
            display: flex;
            justify-content: space-between;
            align-items: center;
        }
        .ups-footer-info {
            font-size: 0.8rem;
            color: var(--text-muted);
        }
        .ups-footer-actions {
            display: flex;
            gap: 0.5rem;
        }
        .ups-btn {
            padding: 0.6rem 1.25rem;
            border-radius: 8px;
            font-size: 0.85rem;
            cursor: pointer;
            font-family: inherit;
            transition: all 0.2s ease;
        }
        .ups-btn.cancel {
            background: transparent;
            border: 1px solid rgba(255,255,255,0.1);
            color: var(--text-secondary);
        }
        .ups-btn.cancel:hover { background: rgba(255,255,255,0.05); }
        .ups-btn.select {
            background: linear-gradient(135deg, var(--gold-primary) 0%, #b8923f 100%);
            border: none;
            color: #0a0a0f;
            font-weight: 500;
        }
        .ups-btn.select:hover { box-shadow: 0 4px 16px rgba(212,168,85,0.3); }
        .ups-btn.select:disabled {
            opacity: 0.5;
            cursor: not-allowed;
            box-shadow: none;
        }
        
        /* ===== LUMINARY CONTEXT HUB ===== */
        .lch-modal {
            position: fixed;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background: rgba(0,0,0,0.9);
            backdrop-filter: blur(12px);
            z-index: 10003;
            display: none;
            flex-direction: column;
        }
        .lch-modal.active { display: flex; }
        
        .lch-header {
            background: linear-gradient(180deg, rgba(212,168,85,0.1) 0%, rgba(10,10,15,0.95) 100%);
            border-bottom: 1px solid rgba(212,168,85,0.3);
            padding: 0;
            display: flex;
            justify-content: space-between;
            align-items: stretch;
            height: 60px;
        }
        .lch-header-left {
            display: flex;
            align-items: center;
            gap: 0;
        }
        .lch-logo {
            display: flex;
            align-items: center;
            gap: 0.75rem;
            padding: 0 1.5rem;
            border-right: 1px solid rgba(212,168,85,0.2);
            height: 100%;
            background: rgba(212,168,85,0.05);
        }
        .lch-logo svg { width: 24px; height: 24px; color: var(--gold-primary); }
        .lch-logo-text {
            font-family: 'Space Grotesk', sans-serif;
            font-size: 0.9rem;
            letter-spacing: 0.08em;
            color: var(--gold-primary);
        }
        .lch-logo-sub {
            font-size: 0.65rem;
            color: var(--text-muted);
            letter-spacing: 0.05em;
        }
        .lch-stats {
            display: flex;
            align-items: center;
            gap: 1.5rem;
            padding: 0 1.5rem;
        }
        .lch-stat {
            text-align: center;
        }
        .lch-stat-value {
            font-size: 1.1rem;
            font-weight: 600;
            color: var(--gold-primary);
        }
        .lch-stat-label {
            font-size: 0.6rem;
            color: var(--text-muted);
            text-transform: uppercase;
            letter-spacing: 0.05em;
        }
        .lch-header-actions {
            display: flex;
            align-items: center;
            gap: 0.75rem;
            padding: 0 1rem;
        }
        .lch-btn {
            padding: 0.5rem 1rem;
            border-radius: 8px;
            font-size: 0.8rem;
            cursor: pointer;
            font-family: inherit;
            transition: all 0.2s ease;
            display: flex;
            align-items: center;
            gap: 0.4rem;
        }
        .lch-btn.secondary {
            background: rgba(255,255,255,0.05);
            border: 1px solid rgba(255,255,255,0.1);
            color: var(--text-secondary);
        }
        .lch-btn.primary {
            background: linear-gradient(135deg, var(--gold-primary) 0%, #b8923f 100%);
            border: none;
            color: #0a0a0f;
            font-weight: 500;
        }
        .lch-btn.primary:hover { box-shadow: 0 4px 16px rgba(212,168,85,0.3); }
        .lch-btn svg { width: 16px; height: 16px; }
        .lch-close-btn {
            background: transparent;
            border: none;
            color: var(--text-muted);
            cursor: pointer;
            padding: 0.5rem;
            border-radius: 6px;
        }
        .lch-close-btn:hover { background: rgba(255,255,255,0.05); color: var(--text-primary); }
        
        .lch-body {
            flex: 1;
            display: flex;
            overflow: hidden;
        }
        
        /* Categories Sidebar */
        .lch-sidebar {
            width: 280px;
            border-right: 1px solid rgba(255,255,255,0.06);
            background: rgba(0,0,0,0.2);
            display: flex;
            flex-direction: column;
            overflow: hidden;
        }
        .lch-sidebar-header {
            padding: 1rem;
            border-bottom: 1px solid rgba(255,255,255,0.06);
        }
        .lch-sidebar-title {
            font-size: 0.7rem;
            text-transform: uppercase;
            letter-spacing: 0.1em;
            color: var(--text-muted);
            margin-bottom: 0.75rem;
        }
        .lch-sidebar-search {
            display: flex;
            align-items: center;
            gap: 0.5rem;
            background: rgba(0,0,0,0.3);
            border: 1px solid rgba(255,255,255,0.08);
            border-radius: 8px;
            padding: 0.5rem 0.75rem;
        }
        .lch-sidebar-search svg { width: 14px; height: 14px; color: var(--text-muted); }
        .lch-sidebar-search input {
            flex: 1;
            background: transparent;
            border: none;
            color: var(--text-primary);
            font-size: 0.8rem;
            outline: none;
        }
        .lch-categories {
            flex: 1;
            overflow-y: auto;
            padding: 0.5rem;
        }
        .lch-category {
            display: flex;
            align-items: center;
            gap: 0.75rem;
            padding: 0.75rem;
            border-radius: 10px;
            cursor: pointer;
            transition: all 0.15s ease;
            margin-bottom: 0.25rem;
        }
        .lch-category:hover { background: rgba(255,255,255,0.03); }
        .lch-category.active {
            background: rgba(212,168,85,0.1);
            border: 1px solid rgba(212,168,85,0.3);
        }
        .lch-category-icon {
            width: 36px;
            height: 36px;
            border-radius: 8px;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 1.1rem;
            background: rgba(255,255,255,0.03);
            flex-shrink: 0;
        }
        .lch-category.active .lch-category-icon { background: rgba(212,168,85,0.15); }
        .lch-category-content { flex: 1; min-width: 0; }
        .lch-category-name {
            font-size: 0.85rem;
            color: var(--text-primary);
            margin-bottom: 0.15rem;
        }
        .lch-category-status {
            font-size: 0.7rem;
            color: var(--text-muted);
        }
        .lch-category-status.filled { color: #22c55e; }
        .lch-category-indicator {
            width: 8px;
            height: 8px;
            border-radius: 50%;
            background: rgba(255,255,255,0.1);
        }
        .lch-category-indicator.filled { background: #22c55e; }
        .lch-category-indicator.partial { background: #fbbf24; }
        
        /* Main Content Area */
        .lch-main {
            flex: 1;
            display: flex;
            flex-direction: column;
            overflow: hidden;
            background: rgba(0,0,0,0.1);
        }
        .lch-main-header {
            padding: 1.25rem 1.5rem;
            border-bottom: 1px solid rgba(255,255,255,0.06);
            display: flex;
            justify-content: space-between;
            align-items: center;
        }
        .lch-main-title {
            display: flex;
            align-items: center;
            gap: 0.75rem;
        }
        .lch-main-title-icon {
            font-size: 1.5rem;
        }
        .lch-main-title-text h3 {
            font-size: 1.1rem;
            color: var(--text-primary);
            margin: 0 0 0.25rem 0;
            font-weight: 500;
        }
        .lch-main-title-text p {
            font-size: 0.8rem;
            color: var(--text-muted);
            margin: 0;
        }
        .lch-main-actions {
            display: flex;
            gap: 0.5rem;
        }
        
        .lch-content {
            flex: 1;
            overflow-y: auto;
            padding: 1.5rem;
        }
        
        /* Editor Area */
        .lch-editor {
            background: rgba(0,0,0,0.2);
            border: 1px solid rgba(255,255,255,0.08);
            border-radius: 12px;
            overflow: hidden;
        }
        .lch-editor-toolbar {
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 0.75rem 1rem;
            background: rgba(0,0,0,0.2);
            border-bottom: 1px solid rgba(255,255,255,0.06);
        }
        .lch-editor-tabs {
            display: flex;
            gap: 0.25rem;
        }
        .lch-editor-tab {
            padding: 0.4rem 0.75rem;
            background: transparent;
            border: none;
            border-radius: 6px;
            color: var(--text-muted);
            font-size: 0.75rem;
            cursor: pointer;
            transition: all 0.15s ease;
            display: flex;
            align-items: center;
            gap: 0.35rem;
        }
        .lch-editor-tab:hover { color: var(--text-primary); background: rgba(255,255,255,0.03); }
        .lch-editor-tab.active {
            background: rgba(212,168,85,0.15);
            color: var(--gold-primary);
        }
        .lch-editor-tab svg { width: 14px; height: 14px; }
        .lch-editor-actions {
            display: flex;
            gap: 0.5rem;
        }
        .lch-editor-action {
            padding: 0.4rem 0.6rem;
            background: rgba(255,255,255,0.03);
            border: 1px solid rgba(255,255,255,0.08);
            border-radius: 6px;
            color: var(--text-secondary);
            font-size: 0.7rem;
            cursor: pointer;
            display: flex;
            align-items: center;
            gap: 0.3rem;
        }
        .lch-editor-action:hover { background: rgba(255,255,255,0.06); color: var(--text-primary); }
        .lch-editor-action.recording {
            background: rgba(239,68,68,0.15);
            border-color: rgba(239,68,68,0.3);
            color: #ef4444;
            animation: pulse 1.5s infinite;
        }
        .lch-editor-body {
            min-height: 300px;
        }
        .lch-editor-body textarea {
            width: 100%;
            min-height: 300px;
            padding: 1rem;
            background: transparent;
            border: none;
            color: var(--text-primary);
            font-size: 0.9rem;
            line-height: 1.6;
            resize: vertical;
            font-family: inherit;
        }
        .lch-editor-body textarea:focus { outline: none; }
        .lch-editor-body textarea::placeholder { color: var(--text-muted); }
        
        /* Upload Zone */
        .lch-upload-zone {
            padding: 2rem;
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            min-height: 250px;
        }
        .lch-upload-dropzone {
            width: 100%;
            padding: 2rem;
            border: 2px dashed rgba(212,168,85,0.3);
            border-radius: 12px;
            text-align: center;
            cursor: pointer;
            transition: all 0.2s ease;
        }
        .lch-upload-dropzone:hover {
            border-color: rgba(212,168,85,0.5);
            background: rgba(212,168,85,0.05);
        }
        .lch-upload-dropzone.dragover {
            border-color: var(--gold-primary);
            background: rgba(212,168,85,0.1);
        }
        .lch-upload-icon {
            width: 48px;
            height: 48px;
            margin: 0 auto 1rem;
            color: var(--gold-primary);
            opacity: 0.6;
        }
        .lch-upload-text {
            font-size: 0.9rem;
            color: var(--text-secondary);
            margin-bottom: 0.5rem;
        }
        .lch-upload-hint {
            font-size: 0.75rem;
            color: var(--text-muted);
        }
        .lch-upload-formats {
            display: flex;
            justify-content: center;
            gap: 0.5rem;
            margin-top: 1rem;
        }
        .lch-upload-format {
            padding: 0.3rem 0.6rem;
            background: rgba(255,255,255,0.03);
            border-radius: 4px;
            font-size: 0.65rem;
            color: var(--text-muted);
        }
        
        /* Processing Status */
        .lch-processing {
            padding: 2rem;
            text-align: center;
        }
        .lch-processing-spinner {
            width: 40px;
            height: 40px;
            border: 3px solid rgba(212,168,85,0.2);
            border-top-color: var(--gold-primary);
            border-radius: 50%;
            animation: spin 1s linear infinite;
            margin: 0 auto 1rem;
        }
        .lch-processing-text {
            font-size: 0.9rem;
            color: var(--text-secondary);
            margin-bottom: 0.5rem;
        }
        .lch-processing-detail {
            font-size: 0.75rem;
            color: var(--text-muted);
        }
        
        /* Voice Recording */
        .lch-voice-panel {
            padding: 2rem;
            text-align: center;
        }
        .lch-voice-visualizer {
            height: 60px;
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 3px;
            margin-bottom: 1.5rem;
        }
        .lch-voice-bar {
            width: 4px;
            height: 20px;
            background: var(--gold-primary);
            border-radius: 2px;
            animation: voiceBar 0.5s ease-in-out infinite alternate;
        }
        .lch-voice-bar:nth-child(2) { animation-delay: 0.1s; }
        .lch-voice-bar:nth-child(3) { animation-delay: 0.2s; }
        .lch-voice-bar:nth-child(4) { animation-delay: 0.3s; }
        .lch-voice-bar:nth-child(5) { animation-delay: 0.4s; }
        @keyframes voiceBar {
            from { height: 10px; opacity: 0.4; }
            to { height: 40px; opacity: 1; }
        }
        .lch-voice-timer {
            font-size: 2rem;
            font-family: 'Courier New', monospace;
            color: var(--gold-primary);
            margin-bottom: 1rem;
        }
        .lch-voice-controls {
            display: flex;
            justify-content: center;
            gap: 1rem;
        }
        .lch-voice-btn {
            width: 60px;
            height: 60px;
            border-radius: 50%;
            border: none;
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            transition: all 0.2s ease;
        }
        .lch-voice-btn.record {
            background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
            color: white;
        }
        .lch-voice-btn.record:hover { transform: scale(1.1); box-shadow: 0 4px 20px rgba(239,68,68,0.4); }
        .lch-voice-btn.stop {
            background: rgba(255,255,255,0.1);
            border: 2px solid rgba(255,255,255,0.2);
            color: var(--text-primary);
        }
        .lch-voice-btn svg { width: 24px; height: 24px; }
        
        /* Footer */
        .lch-editor-footer {
            padding: 0.75rem 1rem;
            background: rgba(0,0,0,0.2);
            border-top: 1px solid rgba(255,255,255,0.06);
            display: flex;
            justify-content: space-between;
            align-items: center;
        }
        .lch-editor-meta {
            font-size: 0.7rem;
            color: var(--text-muted);
        }
        .lch-editor-save {
            display: flex;
            gap: 0.5rem;
        }
        
        /* Right Panel - Preview/Usage */
        .lch-preview {
            width: 320px;
            border-left: 1px solid rgba(255,255,255,0.06);
            background: rgba(0,0,0,0.2);
            display: flex;
            flex-direction: column;
            overflow: hidden;
        }
        .lch-preview-header {
            padding: 1rem;
            border-bottom: 1px solid rgba(255,255,255,0.06);
        }
        .lch-preview-title {
            font-size: 0.7rem;
            text-transform: uppercase;
            letter-spacing: 0.1em;
            color: var(--text-muted);
            margin-bottom: 0.5rem;
        }
        .lch-preview-desc {
            font-size: 0.8rem;
            color: var(--text-secondary);
        }
        .lch-preview-content {
            flex: 1;
            overflow-y: auto;
            padding: 1rem;
        }
        .lch-usage-item {
            padding: 0.75rem;
            background: rgba(255,255,255,0.02);
            border: 1px solid rgba(255,255,255,0.06);
            border-radius: 8px;
            margin-bottom: 0.5rem;
        }
        .lch-usage-item-header {
            display: flex;
            align-items: center;
            gap: 0.5rem;
            margin-bottom: 0.35rem;
        }
        .lch-usage-item-icon { font-size: 1rem; }
        .lch-usage-item-name {
            font-size: 0.8rem;
            color: var(--text-primary);
        }
        .lch-usage-item-desc {
            font-size: 0.7rem;
            color: var(--text-muted);
        }
        .lch-preview-footer {
            padding: 1rem;
            border-top: 1px solid rgba(255,255,255,0.06);
        }
        .lch-preview-toggle {
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 0.5rem 0;
        }
        .lch-preview-toggle-label {
            font-size: 0.8rem;
            color: var(--text-secondary);
        }
        .lch-toggle-switch {
            width: 40px;
            height: 22px;
            background: rgba(255,255,255,0.1);
            border-radius: 11px;
            position: relative;
            cursor: pointer;
            transition: all 0.2s ease;
        }
        .lch-toggle-switch.on { background: rgba(34,197,94,0.4); }
        .lch-toggle-switch::after {
            content: '';
            position: absolute;
            width: 18px;
            height: 18px;
            background: white;
            border-radius: 50%;
            top: 2px;
            left: 2px;
            transition: all 0.2s ease;
        }
        .lch-toggle-switch.on::after { left: 20px; }
        
        .email-inbox-fullscreen {
            position: fixed;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            width: 100vw;
            height: 100vh;
            background: #0a0a0f;
            z-index: 99999;
            display: none;
            flex-direction: column;
            isolation: isolate;
        }
        .email-inbox-fullscreen.active { display: flex; }
        
        .inbox-header {
            display: flex;
            align-items: center;
            justify-content: space-between;
            padding: 1rem 1.5rem;
            background: rgba(0,0,0,0.4);
            border-bottom: 1px solid rgba(255,255,255,0.06);
        }
        .inbox-header-left {
            display: flex;
            align-items: center;
            gap: 1rem;
        }
        .inbox-title {
            font-family: 'Space Grotesk', sans-serif;
            font-size: 1.3rem;
            color: var(--gold-primary);
            display: flex;
            align-items: center;
            gap: 0.6rem;
        }
        .inbox-close-btn {
            background: transparent;
            border: none;
            color: var(--text-muted);
            cursor: pointer;
            padding: 0.5rem;
            border-radius: 8px;
            transition: all 0.2s ease;
        }
        .inbox-close-btn:hover {
            background: rgba(255,255,255,0.08);
            color: var(--text-primary);
        }
        .inbox-compose-btn {
            background: linear-gradient(135deg, var(--gold-primary), #c49a45);
            border: none;
            color: #0a0a0b;
            padding: 0.6rem 1.25rem;
            border-radius: 8px;
            font-size: 0.85rem;
            font-weight: 600;
            cursor: pointer;
            display: flex;
            align-items: center;
            gap: 0.4rem;
            transition: all 0.2s ease;
        }
        .inbox-compose-btn:hover {
            transform: translateY(-1px);
            box-shadow: 0 4px 15px rgba(212,168,83,0.3);
        }
        
        .inbox-body {
            flex: 1;
            display: grid;
            grid-template-columns: 200px 350px 1fr;
            overflow: hidden;
        }
        
        /* Folders sidebar */
        .inbox-folders {
            background: rgba(0,0,0,0.3);
            border-right: 1px solid rgba(255,255,255,0.06);
            padding: 1rem 0;
            overflow-y: auto;
        }
        .inbox-folder {
            display: flex;
            align-items: center;
            gap: 0.75rem;
            padding: 0.75rem 1.25rem;
            color: var(--text-secondary);
            cursor: pointer;
            transition: all 0.15s ease;
            font-size: 0.9rem;
        }
        .inbox-folder:hover {
            background: rgba(255,255,255,0.04);
            color: var(--text-primary);
        }
        .inbox-folder.active {
            background: rgba(212,168,83,0.1);
            color: var(--gold-primary);
            border-right: 2px solid var(--gold-primary);
        }
        .inbox-folder svg { width: 18px; height: 18px; flex-shrink: 0; }
        .inbox-folder-count {
            margin-left: auto;
            background: rgba(255,255,255,0.1);
            padding: 0.15rem 0.5rem;
            border-radius: 10px;
            font-size: 0.75rem;
            color: var(--text-muted);
        }
        .inbox-folder.active .inbox-folder-count {
            background: rgba(212,168,83,0.2);
            color: var(--gold-primary);
        }
        
        /* Email list */
        .inbox-list {
            background: rgba(0,0,0,0.15);
            border-right: 1px solid rgba(255,255,255,0.06);
            overflow-y: auto;
            display: flex;
            flex-direction: column;
        }
        .inbox-list-header {
            padding: 0.75rem 1rem;
            border-bottom: 1px solid rgba(255,255,255,0.06);
            display: flex;
            align-items: center;
            gap: 0.75rem;
            background: rgba(0,0,0,0.2);
        }
        .inbox-search {
            flex: 1;
            background: rgba(0,0,0,0.3);
            border: 1px solid rgba(255,255,255,0.08);
            border-radius: 8px;
            padding: 0.5rem 0.75rem;
            color: var(--text-primary);
            font-size: 0.85rem;
        }
        .inbox-search:focus {
            outline: none;
            border-color: rgba(212,168,83,0.3);
        }
        .inbox-list-actions {
            display: flex;
            gap: 0.25rem;
        }
        .inbox-list-action {
            background: transparent;
            border: none;
            color: var(--text-muted);
            padding: 0.4rem;
            border-radius: 6px;
            cursor: pointer;
            transition: all 0.15s ease;
        }
        .inbox-list-action:hover {
            background: rgba(255,255,255,0.08);
            color: var(--text-primary);
        }
        .inbox-emails {
            flex: 1;
            overflow-y: auto;
        }
        .inbox-email-item {
            display: flex;
            gap: 0.75rem;
            padding: 1rem;
            border-bottom: 1px solid rgba(255,255,255,0.04);
            cursor: pointer;
            transition: all 0.15s ease;
        }
        .inbox-email-item:hover {
            background: rgba(255,255,255,0.03);
        }
        .inbox-email-item.active {
            background: rgba(212,168,83,0.08);
            border-left: 3px solid var(--gold-primary);
        }
        .inbox-email-item.unread {
            background: rgba(59,130,246,0.05);
        }
        .inbox-email-item.unread .inbox-email-sender {
            color: var(--text-primary);
            font-weight: 600;
        }
        .inbox-email-item.unread .inbox-email-subject {
            color: var(--text-primary);
            font-weight: 500;
        }
        .inbox-email-checkbox {
            width: 18px;
            height: 18px;
            accent-color: var(--gold-primary);
            flex-shrink: 0;
            margin-top: 0.15rem;
        }
        .inbox-email-star {
            background: none;
            border: none;
            color: var(--text-muted);
            cursor: pointer;
            padding: 0;
            font-size: 1.1rem;
            transition: all 0.15s ease;
        }
        .inbox-email-star:hover { color: #fbbf24; }
        .inbox-email-star.starred { color: #fbbf24; }
        .inbox-email-content { flex: 1; min-width: 0; }
        .inbox-email-sender {
            font-size: 0.9rem;
            color: var(--text-secondary);
            margin-bottom: 0.25rem;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
        }
        .inbox-email-subject {
            font-size: 0.85rem;
            color: var(--text-secondary);
            margin-bottom: 0.25rem;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
        }
        .inbox-email-preview {
            font-size: 0.8rem;
            color: var(--text-muted);
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
        }
        .inbox-email-meta {
            display: flex;
            flex-direction: column;
            align-items: flex-end;
            gap: 0.25rem;
            flex-shrink: 0;
        }
        .inbox-email-date {
            font-size: 0.75rem;
            color: var(--text-muted);
        }
        .inbox-email-attachment {
            color: var(--text-muted);
            font-size: 0.8rem;
        }
        
        /* Email viewer */
        .inbox-viewer {
            display: flex;
            flex-direction: column;
            background: var(--bg-card);
            overflow: hidden;
        }
        .inbox-viewer-empty {
            flex: 1;
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            color: var(--text-muted);
            gap: 1rem;
        }
        .inbox-viewer-empty svg {
            width: 64px;
            height: 64px;
            opacity: 0.3;
        }
        .inbox-viewer-header {
            padding: 1.25rem 1.5rem;
            border-bottom: 1px solid rgba(255,255,255,0.06);
            background: rgba(0,0,0,0.2);
        }
        .inbox-viewer-subject {
            font-size: 1.25rem;
            color: var(--text-primary);
            margin-bottom: 0.75rem;
        }
        .inbox-viewer-meta {
            display: flex;
            align-items: center;
            gap: 1rem;
        }
        .inbox-viewer-from {
            display: flex;
            align-items: center;
            gap: 0.75rem;
        }
        .inbox-viewer-avatar {
            width: 40px;
            height: 40px;
            border-radius: 50%;
            background: linear-gradient(135deg, rgba(212,168,83,0.2), rgba(212,168,83,0.1));
            display: flex;
            align-items: center;
            justify-content: center;
            color: var(--gold-primary);
            font-weight: 600;
            font-size: 1rem;
        }
        .inbox-viewer-from-info { }
        .inbox-viewer-from-name {
            font-size: 0.95rem;
            color: var(--text-primary);
            font-weight: 500;
        }
        .inbox-viewer-from-email {
            font-size: 0.8rem;
            color: var(--text-muted);
        }
        .inbox-viewer-date {
            margin-left: auto;
            font-size: 0.8rem;
            color: var(--text-muted);
        }
        .inbox-viewer-actions {
            display: flex;
            gap: 0.5rem;
            margin-left: 1rem;
        }
        .inbox-viewer-action {
            background: rgba(255,255,255,0.05);
            border: 1px solid rgba(255,255,255,0.1);
            color: var(--text-secondary);
            padding: 0.4rem 0.75rem;
            border-radius: 6px;
            font-size: 0.8rem;
            cursor: pointer;
            display: flex;
            align-items: center;
            gap: 0.35rem;
            transition: all 0.15s ease;
        }
        .inbox-viewer-action:hover {
            background: rgba(255,255,255,0.1);
            color: var(--text-primary);
        }
        .inbox-viewer-action.primary {
            background: rgba(212,168,83,0.15);
            border-color: rgba(212,168,83,0.3);
            color: var(--gold-primary);
        }
        .inbox-viewer-action.primary:hover {
            background: rgba(212,168,83,0.25);
        }
        .inbox-viewer-body {
            flex: 1;
            overflow-y: auto;
            padding: 1.5rem;
        }
        .inbox-viewer-content {
            font-family: 'Inter', sans-serif;
            font-size: 1.05rem;
            line-height: 1.7;
            color: var(--text-secondary);
        }
        .inbox-viewer-content p { margin-bottom: 1rem; }
        
        /* Reply compose */
        .inbox-reply-area {
            border-top: 1px solid rgba(255,255,255,0.06);
            padding: 1rem 1.5rem;
            background: rgba(0,0,0,0.2);
        }
        .inbox-reply-toggle {
            background: rgba(255,255,255,0.05);
            border: 1px solid rgba(255,255,255,0.1);
            color: var(--text-secondary);
            padding: 0.6rem 1rem;
            border-radius: 8px;
            cursor: pointer;
            width: 100%;
            text-align: left;
            font-size: 0.9rem;
            display: flex;
            align-items: center;
            gap: 0.5rem;
            transition: all 0.15s ease;
        }
        .inbox-reply-toggle:hover {
            background: rgba(255,255,255,0.08);
            border-color: rgba(212,168,83,0.3);
        }
        .inbox-reply-compose {
            display: none;
        }
        .inbox-reply-compose.active {
            display: block;
        }
        .inbox-reply-textarea {
            width: 100%;
            min-height: 120px;
            background: rgba(0,0,0,0.3);
            border: 1px solid rgba(255,255,255,0.1);
            border-radius: 10px;
            padding: 1rem;
            color: var(--text-primary);
            font-size: 0.95rem;
            font-family: inherit;
            resize: vertical;
            margin-bottom: 0.75rem;
        }
        .inbox-reply-textarea:focus {
            outline: none;
            border-color: rgba(212,168,83,0.4);
        }
        .inbox-reply-actions {
            display: flex;
            gap: 0.5rem;
            justify-content: flex-end;
        }
        .inbox-reply-btn {
            padding: 0.6rem 1.25rem;
            border-radius: 8px;
            font-size: 0.85rem;
            cursor: pointer;
            transition: all 0.2s ease;
        }
        .inbox-reply-btn.cancel {
            background: transparent;
            border: 1px solid rgba(255,255,255,0.15);
            color: var(--text-secondary);
        }
        .inbox-reply-btn.send {
            background: linear-gradient(135deg, var(--gold-primary), #c49a45);
            border: none;
            color: #0a0a0b;
            font-weight: 600;
        }
        .inbox-reply-btn.send:hover {
            transform: translateY(-1px);
            box-shadow: 0 4px 15px rgba(212,168,83,0.3);
        }
        
        /* Compose Modal */
        .inbox-compose-modal {
            position: fixed;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background: rgba(0,0,0,0.85);
            backdrop-filter: blur(8px);
            display: none;
            align-items: center;
            justify-content: center;
            z-index: 10003;
            padding: 2rem;
        }
        .inbox-compose-modal.active { display: flex; }
        .inbox-compose-content {
            background: linear-gradient(180deg, #12121a 0%, #0a0a10 100%);
            border: 1px solid rgba(212,168,83,0.2);
            border-radius: 16px;
            width: 100%;
            max-width: 700px;
            max-height: 80vh;
            overflow: hidden;
            display: flex;
            flex-direction: column;
        }
        .inbox-compose-header {
            padding: 1.25rem 1.5rem;
            border-bottom: 1px solid rgba(255,255,255,0.06);
            display: flex;
            align-items: center;
            justify-content: space-between;
            background: rgba(0,0,0,0.3);
        }
        .inbox-compose-title {
            font-family: 'Space Grotesk', sans-serif;
            font-size: 1.15rem;
            color: var(--gold-primary);
        }
        .inbox-compose-close {
            background: transparent;
            border: none;
            color: var(--text-muted);
            cursor: pointer;
            padding: 0.4rem;
            border-radius: 6px;
            transition: all 0.15s ease;
        }
        .inbox-compose-close:hover {
            background: rgba(255,255,255,0.08);
            color: var(--text-primary);
        }
        .inbox-compose-body {
            flex: 1;
            overflow-y: auto;
            padding: 1.5rem;
            display: flex;
            flex-direction: column;
            gap: 1rem;
        }
        .inbox-compose-field {
            display: flex;
            flex-direction: column;
            gap: 0.4rem;
        }
        .inbox-compose-field label {
            font-size: 0.75rem;
            color: var(--text-muted);
            letter-spacing: 0.05em;
        }
        .inbox-compose-field input {
            background: rgba(0,0,0,0.3);
            border: 1px solid rgba(255,255,255,0.1);
            border-radius: 8px;
            padding: 0.7rem 1rem;
            color: var(--text-primary);
            font-size: 0.9rem;
        }
        .inbox-compose-field input:focus {
            outline: none;
            border-color: rgba(212,168,83,0.4);
        }
        .inbox-compose-field textarea {
            background: rgba(0,0,0,0.3);
            border: 1px solid rgba(255,255,255,0.1);
            border-radius: 8px;
            padding: 1rem;
            color: var(--text-primary);
            font-size: 0.95rem;
            font-family: inherit;
            min-height: 200px;
            resize: vertical;
        }
        .inbox-compose-field textarea:focus {
            outline: none;
            border-color: rgba(212,168,83,0.4);
        }
        .inbox-compose-footer {
            padding: 1rem 1.5rem;
            border-top: 1px solid rgba(255,255,255,0.06);
            display: flex;
            justify-content: flex-end;
            gap: 0.75rem;
            background: rgba(0,0,0,0.2);
        }
        .inbox-compose-btn {
            padding: 0.65rem 1.5rem;
            border-radius: 8px;
            font-size: 0.9rem;
            cursor: pointer;
            transition: all 0.2s ease;
        }
        .inbox-compose-btn.cancel {
            background: transparent;
            border: 1px solid rgba(255,255,255,0.15);
            color: var(--text-secondary);
        }
        .inbox-compose-btn.send {
            background: linear-gradient(135deg, var(--gold-primary), #c49a45);
            border: none;
            color: #0a0a0b;
            font-weight: 600;
        }
        .inbox-compose-btn.send:hover {
            transform: translateY(-1px);
            box-shadow: 0 4px 15px rgba(212,168,83,0.3);
        }
        /* ===== END EMAIL INBOX STYLES ===== */

        /* ===== COMMUNICATIONS CENTER STYLES ===== */
        .comms-center-fullscreen {
            position: fixed;
            inset: 0;
            z-index: 99999;
            background: linear-gradient(180deg, #0d0d14 0%, #0a0a10 100%);
            display: flex;
            flex-direction: column;
            overflow: hidden;
        }
        /* Inline mode — flows inside detail-main instead of fullscreen overlay */
        .comms-inline {
            position: relative;
            inset: auto;
            z-index: auto;
            background: transparent;
            display: flex;
            flex-direction: column;
            height: 100%;
            overflow: hidden;
        }
        /* Overview stats bar */
        .comms-overview-stats {
            display: flex;
            align-items: center;
            gap: 16px;
            padding: 12px 20px;
            background: rgba(0,0,0,0.25);
            border-bottom: 1px solid rgba(255,255,255,0.06);
            flex-shrink: 0;
        }
        .comms-stat-chip {
            display: flex;
            align-items: center;
            gap: 6px;
            padding: 6px 14px;
            background: rgba(255,255,255,0.04);
            border: 1px solid rgba(255,255,255,0.08);
            border-radius: 8px;
            font-size: 13px;
            color: var(--text-secondary);
        }
        .comms-stat-chip .comms-stat-val {
            font-weight: 700;
            color: var(--text-primary);
        }
        .comms-stat-chip.active {
            border-color: rgba(212,168,83,0.3);
            background: rgba(212,168,83,0.08);
            color: var(--gold-primary);
        }
        /* Filter chips bar (replaces sidebar in overview) */
        .comms-filter-chips {
            display: flex;
            align-items: center;
            gap: 8px;
            padding: 10px 20px;
            background: rgba(0,0,0,0.15);
            border-bottom: 1px solid rgba(255,255,255,0.04);
            flex-shrink: 0;
            flex-wrap: wrap;
        }
        .comms-filter-chips .comms-chip {
            display: flex;
            align-items: center;
            gap: 6px;
            padding: 5px 12px;
            background: rgba(255,255,255,0.04);
            border: 1px solid rgba(255,255,255,0.08);
            border-radius: 20px;
            font-size: 12px;
            color: var(--text-secondary);
            cursor: pointer;
            transition: all 0.15s;
        }
        .comms-filter-chips .comms-chip:hover {
            background: rgba(255,255,255,0.08);
            color: var(--text-primary);
        }
        .comms-filter-chips .comms-chip.active {
            border-color: rgba(212,168,83,0.3);
            background: rgba(212,168,83,0.1);
            color: var(--gold-primary);
        }
        .comms-filter-chips .comms-chip-dot {
            width: 8px;
            height: 8px;
            border-radius: 50%;
            flex-shrink: 0;
        }
        .comms-filter-chips .comms-chip-label { font-size: 11px; font-weight: 600; letter-spacing: 1px; color: var(--text-muted); margin-right: 4px; }
        /* Overview: hide sidebar + viewer, show email list full-width */
        .comms-inline .comms-body {
            grid-template-columns: 1fr;
        }
        .comms-inline .comms-sidebar { display: none; }
        .comms-inline.comms-overview .comms-viewer-wrapper { display: none; }
        .comms-inline.comms-overview .comms-list-column { border-right: none; }
        /* Detail level: hide email list, show viewer full-width with context */
        .comms-inline.comms-detail .comms-list-column { display: none; }
        .comms-inline.comms-detail .comms-viewer-wrapper { display: grid; grid-template-columns: 1fr 280px; }
        .comms-inline.comms-detail .comms-body { grid-template-columns: 1fr; }
        /* Back to inbox button */
        .comms-back-btn {
            display: flex;
            align-items: center;
            gap: 6px;
            padding: 6px 14px;
            background: rgba(255,255,255,0.06);
            border: 1px solid rgba(255,255,255,0.1);
            border-radius: 8px;
            color: var(--text-secondary);
            font-size: 13px;
            cursor: pointer;
            transition: all 0.15s;
        }
        .comms-back-btn:hover { background: rgba(255,255,255,0.1); color: var(--text-primary); }
        .comms-header {
            display: flex;
            align-items: center;
            justify-content: space-between;
            padding: 12px 20px;
            background: rgba(0,0,0,0.5);
            border-bottom: 1px solid rgba(212,168,83,0.15);
            flex-shrink: 0;
        }
        .comms-header-left {
            display: flex;
            align-items: center;
            gap: 16px;
        }
        .comms-title {
            display: flex;
            align-items: center;
            gap: 10px;
            font-family: 'Space Grotesk', sans-serif;
            font-size: 1.15rem;
            color: var(--gold-primary);
        }
        .comms-title svg { color: var(--gold-primary); }
        .comms-compose-btn {
            display: flex;
            align-items: center;
            gap: 6px;
            padding: 8px 16px;
            background: linear-gradient(135deg, var(--gold-primary), #c49a45);
            border: none;
            border-radius: 8px;
            color: #0a0a0b;
            font-weight: 600;
            font-size: 0.85rem;
            cursor: pointer;
            transition: all 0.2s ease;
        }
        .comms-compose-btn:hover { transform: translateY(-1px); box-shadow: 0 4px 15px rgba(212,168,83,0.3); }
        .comms-refresh-btn {
            background: rgba(255,255,255,0.06);
            border: 1px solid rgba(255,255,255,0.1);
            border-radius: 8px;
            padding: 8px;
            color: var(--text-muted);
            cursor: pointer;
            transition: all 0.15s;
        }
        .comms-refresh-btn:hover { background: rgba(255,255,255,0.1); color: var(--text-primary); }
        .comms-close-btn {
            background: transparent;
            border: none;
            color: var(--text-muted);
            cursor: pointer;
            padding: 8px;
            border-radius: 8px;
            transition: all 0.15s;
        }
        .comms-close-btn:hover { background: rgba(255,255,255,0.08); color: var(--text-primary); }

        /* Body Grid: Sidebar | List | Viewer+Context */
        .comms-body {
            flex: 1;
            display: grid;
            grid-template-columns: 200px 340px 1fr;
            overflow: hidden;
        }
        /* V2 mode: comms-body becomes a simple container for the V2 shell */
        .comms-body:has(.comms-v2-container) {
            display: block;
            overflow: hidden;
            height: 100%;
        }

        /* Sidebar */
        .comms-sidebar {
            background: rgba(0,0,0,0.3);
            border-right: 1px solid rgba(255,255,255,0.06);
            overflow-y: auto;
            padding: 12px 0;
        }
        .comms-sidebar-section { margin-bottom: 8px; }
        .comms-sidebar-label {
            padding: 8px 16px 4px;
            font-size: 10px;
            font-weight: 700;
            letter-spacing: 1.5px;
            color: var(--text-muted);
        }
        .comms-account-item, .comms-folder-item {
            display: flex;
            align-items: center;
            gap: 10px;
            padding: 9px 16px;
            cursor: pointer;
            color: var(--text-secondary);
            font-size: 13px;
            transition: all 0.15s;
            border-left: 3px solid transparent;
        }
        .comms-account-item:hover, .comms-folder-item:hover {
            background: rgba(255,255,255,0.04);
            color: var(--text-primary);
        }
        .comms-account-item.active, .comms-folder-item.active {
            background: rgba(212,168,83,0.08);
            color: var(--gold-primary);
            border-left-color: var(--gold-primary);
        }
        .comms-account-dot {
            width: 10px;
            height: 10px;
            border-radius: 50%;
            flex-shrink: 0;
        }
        .comms-account-name, .comms-folder-name { flex: 1; }
        .comms-folder-icon { font-size: 14px; width: 18px; text-align: center; }
        .comms-badge {
            background: #ef4444;
            color: white;
            font-size: 10px;
            font-weight: 700;
            padding: 2px 6px;
            border-radius: 10px;
            min-width: 18px;
            text-align: center;
        }
        .comms-badge-subtle {
            color: var(--text-muted);
            font-size: 11px;
        }

        /* Add Account */
        .comms-add-account-btn {
            display: flex;
            align-items: center;
            gap: 8px;
            padding: 8px 16px;
            cursor: pointer;
            color: var(--text-muted);
            font-size: 12px;
            transition: all 0.15s;
            border-left: 3px solid transparent;
        }
        .comms-add-account-btn:hover {
            background: rgba(255,255,255,0.04);
            color: var(--gold-primary);
        }
        .comms-add-account-form {
            padding: 8px 14px 12px;
            display: flex;
            flex-direction: column;
            gap: 6px;
            border-top: 1px solid rgba(255,255,255,0.06);
            background: rgba(0,0,0,0.15);
        }
        .comms-add-input {
            background: rgba(255,255,255,0.06);
            border: 1px solid rgba(255,255,255,0.1);
            border-radius: 6px;
            padding: 7px 10px;
            color: var(--text-primary);
            font-size: 12px;
            outline: none;
            width: 100%;
            box-sizing: border-box;
        }
        .comms-add-input:focus { border-color: rgba(212,168,83,0.4); }
        .comms-add-input::placeholder { color: var(--text-muted); }
        .comms-add-row {
            display: flex;
            gap: 6px;
            align-items: center;
        }
        .comms-add-select {
            flex: 1;
            background: rgba(255,255,255,0.06);
            border: 1px solid rgba(255,255,255,0.1);
            border-radius: 6px;
            padding: 6px 8px;
            color: var(--text-primary);
            font-size: 12px;
            outline: none;
            cursor: pointer;
        }
        .comms-add-select option { background: #1a1a2e; }
        .comms-add-color {
            width: 32px;
            height: 32px;
            border: 1px solid rgba(255,255,255,0.1);
            border-radius: 6px;
            padding: 2px;
            cursor: pointer;
            background: transparent;
        }

        /* Email List Column */
        .comms-list-column {
            border-right: 1px solid rgba(255,255,255,0.06);
            display: flex;
            flex-direction: column;
            overflow: hidden;
        }
        .comms-list-header {
            display: flex;
            align-items: center;
            gap: 8px;
            padding: 10px 12px;
            border-bottom: 1px solid rgba(255,255,255,0.06);
            flex-shrink: 0;
        }
        .comms-search {
            flex: 1;
            background: rgba(255,255,255,0.06);
            border: 1px solid rgba(255,255,255,0.08);
            border-radius: 8px;
            padding: 8px 12px;
            color: var(--text-primary);
            font-size: 13px;
            outline: none;
        }
        .comms-search:focus { border-color: rgba(212,168,83,0.3); }
        .comms-search::placeholder { color: var(--text-muted); }
        .comms-list-actions { display: flex; gap: 4px; }
        .comms-list-action {
            background: transparent;
            border: none;
            color: var(--text-muted);
            cursor: pointer;
            padding: 6px;
            border-radius: 6px;
        }
        .comms-list-action:hover { background: rgba(255,255,255,0.08); color: var(--text-primary); }

        /* Bulk Actions Bar */
        .comms-bulk-bar {
            display: flex;
            align-items: center;
            gap: 8px;
            padding: 6px 12px;
            background: rgba(212,168,83,0.08);
            border-bottom: 1px solid rgba(212,168,83,0.15);
            flex-shrink: 0;
        }
        .comms-bulk-count { font-size: 12px; color: var(--gold-primary); font-weight: 600; margin-right: 4px; }
        .comms-bulk-bar button {
            padding: 4px 10px;
            background: rgba(255,255,255,0.06);
            border: 1px solid rgba(255,255,255,0.1);
            border-radius: 6px;
            color: var(--text-secondary);
            font-size: 11px;
            cursor: pointer;
        }
        .comms-bulk-bar button:hover { background: rgba(255,255,255,0.1); color: var(--text-primary); }

        /* Email List */
        .comms-email-list {
            flex: 1;
            overflow-y: auto;
        }
        .comms-date-group {
            padding: 8px 14px 4px;
            font-size: 11px;
            font-weight: 600;
            color: var(--text-muted);
            letter-spacing: 0.5px;
            background: rgba(0,0,0,0.2);
            border-bottom: 1px solid rgba(255,255,255,0.03);
            position: sticky;
            top: 0;
            z-index: 1;
        }
        .comms-email-item {
            display: flex;
            align-items: flex-start;
            padding: 12px 14px;
            border-bottom: 1px solid rgba(255,255,255,0.03);
            cursor: pointer;
            transition: all 0.12s;
            gap: 8px;
        }
        .comms-email-item:hover { background: rgba(255,255,255,0.03); }
        .comms-email-item.active { background: rgba(212,168,83,0.08); border-left: 3px solid var(--gold-primary); }
        .comms-email-item.unread .comms-email-sender,
        .comms-email-item.unread .comms-email-subject { font-weight: 700; color: var(--text-primary); }
        .comms-email-item.selected { background: rgba(59,130,246,0.08); }
        .comms-email-checkbox {
            padding-top: 2px;
            flex-shrink: 0;
        }
        .comms-email-checkbox input { width: 14px; height: 14px; accent-color: var(--gold-primary); cursor: pointer; }
        .comms-email-avatar {
            width: 36px;
            height: 36px;
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 13px;
            font-weight: 700;
            color: rgba(255,255,255,0.85);
            flex-shrink: 0;
            position: relative;
            letter-spacing: 0.5px;
        }
        .comms-email-acct-dot {
            position: absolute;
            bottom: -1px;
            right: -1px;
            width: 10px;
            height: 10px;
            border-radius: 50%;
            border: 2px solid var(--bg-primary);
        }
        .comms-email-content { flex: 1; min-width: 0; }
        .comms-email-top { display: flex; align-items: baseline; gap: 6px; margin-bottom: 2px; }
        .comms-email-sender { font-size: 13px; color: var(--text-secondary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; flex: 1; min-width: 0; }
        .comms-email-indicators { display: flex; gap: 2px; font-size: 11px; flex-shrink: 0; }
        .comms-email-attach-icon, .comms-email-thread-icon { opacity: 0.5; font-size: 11px; }
        .comms-email-time { font-size: 11px; color: var(--text-muted); flex-shrink: 0; }
        .comms-email-meta { display: flex; align-items: center; gap: 5px; margin-bottom: 2px; flex-wrap: wrap; }
        .comms-email-org-badge {
            font-size: 10px;
            padding: 1px 7px;
            border-radius: 10px;
            white-space: nowrap;
            max-width: 150px;
            overflow: hidden;
            text-overflow: ellipsis;
        }
        .comms-source-badge {
            font-size: 9px;
            padding: 1px 6px;
            border-radius: 8px;
            font-weight: 600;
            letter-spacing: 0.3px;
        }
        .comms-source-badge.lobby { background: rgba(76,175,80,0.15); color: #4caf50; border: 1px solid rgba(76,175,80,0.25); }
        .comms-account-indicator {
            width: 6px;
            height: 6px;
            border-radius: 50%;
            flex-shrink: 0;
            display: inline-block;
        }
        .comms-email-subject { font-size: 13px; color: var(--text-secondary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
        .comms-email-item.unread .comms-email-avatar { box-shadow: 0 0 0 2px var(--gold-primary); }
        .comms-email-preview { font-size: 12px; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 2px; line-height: 1.4; }
        .comms-email-star {
            font-size: 16px;
            cursor: pointer;
            color: var(--text-muted);
            flex-shrink: 0;
            padding: 2px;
            transition: all 0.15s;
            align-self: center;
        }
        .comms-email-item .comms-email-star:hover { color: var(--gold-primary); transform: scale(1.15); }

        /* Loading / Empty states */
        .comms-loading, .comms-empty {
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            padding: 3rem 1rem;
            color: var(--text-muted);
            font-size: 14px;
        }
        .comms-spinner {
            width: 24px;
            height: 24px;
            border: 2px solid rgba(212,168,83,0.2);
            border-top-color: var(--gold-primary);
            border-radius: 50%;
            animation: commsSpin 0.8s linear infinite;
            margin-bottom: 12px;
        }
        @keyframes commsSpin { to { transform: rotate(360deg); } }

        /* Viewer + Context Wrapper */
        .comms-viewer-wrapper {
            display: grid;
            grid-template-columns: 1fr 280px;
            overflow: hidden;
        }

        /* Viewer */
        .comms-viewer {
            overflow-y: auto;
            display: flex;
            flex-direction: column;
        }
        .comms-viewer-empty {
            flex: 1;
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            padding: 3rem;
        }
        .comms-empty-icon { opacity: 0.6; margin-bottom: 4px; }

        /* Viewer Header */
        .comms-viewer-header {
            display: flex;
            align-items: flex-start;
            justify-content: space-between;
            padding: 20px 28px 14px;
            border-bottom: 1px solid rgba(255,255,255,0.06);
            gap: 16px;
            flex-shrink: 0;
        }
        .comms-viewer-subject-row {
            flex: 1;
            display: flex;
            flex-wrap: wrap;
            align-items: center;
            gap: 10px;
            min-width: 0;
        }
        .comms-viewer-subject { font-size: 20px; font-weight: 700; color: var(--text-primary); line-height: 1.3; }
        .comms-viewer-org-badge {
            font-size: 11px;
            padding: 2px 10px;
            border-radius: 12px;
            white-space: nowrap;
            font-weight: 500;
        }
        .comms-viewer-source-badge {
            font-size: 10px;
            padding: 2px 8px;
            border-radius: 10px;
            background: rgba(76,175,80,0.12);
            color: #4caf50;
            border: 1px solid rgba(76,175,80,0.2);
            font-weight: 600;
        }
        .comms-viewer-actions { display: flex; gap: 5px; flex-shrink: 0; }
        .comms-btn-icon {
            background: rgba(255,255,255,0.04);
            border: 1px solid rgba(255,255,255,0.08);
            border-radius: 8px;
            padding: 7px 11px;
            font-size: 14px;
            cursor: pointer;
            transition: all 0.15s;
        }
        .comms-btn-icon:hover { background: rgba(255,255,255,0.1); transform: translateY(-1px); }
        .comms-star-btn.starred { color: var(--gold-primary); }

        /* Sender Identity Bar */
        .comms-viewer-identity {
            display: flex;
            align-items: center;
            gap: 14px;
            padding: 14px 28px;
            border-bottom: 1px solid rgba(255,255,255,0.05);
            flex-shrink: 0;
        }
        .comms-viewer-avatar {
            width: 42px;
            height: 42px;
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 15px;
            font-weight: 700;
            color: rgba(255,255,255,0.85);
            flex-shrink: 0;
            letter-spacing: 0.5px;
        }
        .comms-viewer-sender-info { flex: 1; min-width: 0; }
        .comms-viewer-sender-line {
            display: flex;
            align-items: baseline;
            gap: 8px;
            margin-bottom: 3px;
        }
        .comms-viewer-sender-name { font-size: 14px; color: var(--text-primary); }
        .comms-viewer-sender-email { font-size: 12px; color: var(--text-muted); }
        .comms-viewer-delivery-line {
            display: flex;
            align-items: center;
            gap: 5px;
            font-size: 12px;
            color: var(--text-muted);
            flex-wrap: wrap;
        }
        .comms-viewer-to-label, .comms-viewer-cc-label { color: var(--text-muted); opacity: 0.6; }
        .comms-viewer-to-addr { color: var(--text-secondary); }
        .comms-viewer-via {
            border-left: 2px solid;
            padding-left: 6px;
            margin-left: 4px;
            font-size: 11px;
            color: var(--text-muted);
            opacity: 0.7;
        }
        .comms-viewer-timestamp {
            text-align: right;
            flex-shrink: 0;
        }
        .comms-viewer-date { font-size: 12px; color: var(--text-secondary); }
        .comms-viewer-time { font-size: 11px; color: var(--text-muted); }

        /* Email Body */
        .comms-viewer-body-wrap {
            flex: 1;
            overflow-y: auto;
        }
        .comms-viewer-body {
            padding: 24px 28px;
            color: var(--text-primary);
            font-size: 14px;
            line-height: 1.75;
        }
        .comms-viewer-body img { max-width: 100%; height: auto; border-radius: 6px; }

        /* HTML email dark-theme normalization */
        .comms-body-html {
            color: var(--text-primary);
        }
        .comms-body-html * {
            max-width: 100% !important;
            box-sizing: border-box;
        }
        .comms-body-html a { color: #7dabf5; text-decoration: underline; }
        .comms-body-html a:hover { color: var(--gold-primary); }
        .comms-body-html table { border-collapse: collapse; max-width: 100%; }
        .comms-body-html img { max-width: 100%; height: auto; }
        .comms-body-html blockquote {
            border-left: 3px solid rgba(212,168,83,0.3);
            margin: 12px 0;
            padding: 4px 16px;
            color: var(--text-secondary);
        }
        .comms-body-html pre, .comms-body-html code {
            background: rgba(0,0,0,0.3);
            border-radius: 4px;
            padding: 2px 6px;
            font-family: 'Courier New', monospace;
            font-size: 13px;
        }
        .comms-body-html pre {
            padding: 12px;
            overflow-x: auto;
        }
        .comms-body-html hr {
            border: none;
            border-top: 1px solid rgba(255,255,255,0.08);
            margin: 16px 0;
        }

        /* Plain text email */
        .comms-body-text {
            white-space: pre-wrap;
            font-family: inherit;
            word-wrap: break-word;
        }
        .comms-body-link {
            color: #7dabf5;
            text-decoration: none;
            border-bottom: 1px solid rgba(125,171,245,0.3);
            transition: all 0.15s;
        }
        .comms-body-link:hover { color: var(--gold-primary); border-bottom-color: var(--gold-primary); }
        .comms-body-empty {
            color: var(--text-muted);
            font-style: italic;
            padding: 20px 0;
        }

        /* Thread Section */
        .comms-thread-section {
            margin: 0 28px 4px;
            border: 1px solid rgba(255,255,255,0.06);
            border-radius: 10px;
            overflow: hidden;
        }
        .comms-thread-label {
            padding: 10px 16px;
            font-size: 12px;
            color: var(--text-muted);
            cursor: pointer;
            display: flex;
            align-items: center;
            gap: 8px;
            background: rgba(255,255,255,0.02);
            transition: background 0.15s;
            user-select: none;
        }
        .comms-thread-label:hover { background: rgba(255,255,255,0.04); }
        .comms-thread-count {
            background: rgba(212,168,83,0.15);
            color: var(--gold-primary);
            font-weight: 700;
            font-size: 11px;
            width: 20px;
            height: 20px;
            border-radius: 50%;
            display: inline-flex;
            align-items: center;
            justify-content: center;
        }
        .comms-thread-toggle { transition: transform 0.25s; margin-left: auto; }
        .comms-thread-toggle.open { transform: rotate(180deg); }
        .comms-thread-messages.collapsed { display: none; }
        .comms-thread-message {
            padding: 14px 16px;
            border-top: 1px solid rgba(255,255,255,0.04);
        }
        .comms-thread-msg-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            font-size: 12px;
            margin-bottom: 8px;
            color: var(--text-secondary);
        }
        .comms-thread-msg-sender {
            display: flex;
            align-items: center;
            gap: 8px;
        }
        .comms-thread-avatar {
            width: 22px;
            height: 22px;
            border-radius: 50%;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            font-size: 9px;
            font-weight: 700;
            color: rgba(255,255,255,0.8);
            flex-shrink: 0;
        }
        .comms-thread-msg-time { color: var(--text-muted); font-size: 11px; }
        .comms-thread-msg-body { font-size: 13px; color: var(--text-secondary); line-height: 1.6; margin-left: 30px; }

        /* Attachments */
        .comms-attachments {
            padding: 16px 28px;
            border-top: 1px solid rgba(255,255,255,0.06);
        }
        .comms-attach-header {
            display: flex;
            align-items: center;
            gap: 8px;
            margin-bottom: 10px;
        }
        .comms-attach-icon-wrap { font-size: 14px; }
        .comms-attach-label { font-size: 12px; font-weight: 600; color: var(--text-muted); }
        .comms-attach-grid {
            display: grid;
            grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
            gap: 8px;
        }
        .comms-attach-card {
            display: flex;
            align-items: center;
            gap: 10px;
            padding: 10px 12px;
            background: rgba(255,255,255,0.03);
            border: 1px solid rgba(255,255,255,0.06);
            border-radius: 10px;
            cursor: pointer;
            transition: all 0.15s;
        }
        .comms-attach-card:hover { background: rgba(255,255,255,0.06); border-color: rgba(212,168,83,0.2); }
        .comms-attach-file-icon { font-size: 20px; }
        .comms-attach-info { flex: 1; min-width: 0; }
        .comms-attach-name { font-size: 12px; color: var(--text-secondary); display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
        .comms-attach-size { font-size: 10px; color: var(--text-muted); display: block; margin-top: 2px; }

        /* Reply Area */
        .comms-reply-area {
            padding: 18px 28px;
            border-top: 2px solid rgba(212,168,83,0.15);
            background: rgba(0,0,0,0.15);
        }
        .comms-reply-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 12px;
        }
        .comms-reply-title {
            font-size: 13px;
            color: var(--text-secondary);
            display: flex;
            align-items: center;
            gap: 6px;
        }
        .comms-reply-title strong { color: var(--text-primary); }
        .comms-reply-account {
            display: flex;
            align-items: center;
            gap: 8px;
            margin-bottom: 12px;
            font-size: 12px;
            color: var(--text-muted);
        }
        .comms-reply-textarea {
            width: 100%;
            min-height: 120px;
            background: rgba(255,255,255,0.03);
            border: 1px solid rgba(255,255,255,0.1);
            border-radius: 12px;
            padding: 14px 16px;
            color: var(--text-primary);
            font-size: 14px;
            font-family: inherit;
            line-height: 1.6;
            resize: vertical;
            outline: none;
            box-sizing: border-box;
            transition: border-color 0.2s;
        }
        .comms-reply-textarea:focus { border-color: rgba(212,168,83,0.35); box-shadow: 0 0 0 3px rgba(212,168,83,0.08); }
        .comms-reply-footer { display: flex; justify-content: flex-end; margin-top: 12px; }

        /* Context Panel */
        .comms-context-panel {
            border-left: 1px solid rgba(255,255,255,0.06);
            overflow-y: auto;
            background: rgba(0,0,0,0.15);
        }
        .comms-context-inner { padding: 16px; }
        .comms-context-org-header { margin-bottom: 14px; }
        .comms-context-org-name { font-size: 16px; font-weight: 700; color: var(--text-primary); margin-bottom: 4px; }
        .comms-context-org-type { font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px; }
        .comms-context-org-location { font-size: 12px; color: var(--text-muted); margin-top: 2px; }
        .comms-context-tags { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 14px; }
        .comms-context-tag {
            font-size: 10px;
            padding: 2px 8px;
            border-radius: 10px;
            background: rgba(139,92,246,0.12);
            color: #a78bfa;
            border: 1px solid rgba(139,92,246,0.2);
        }
        .comms-context-section {
            border-top: 1px solid rgba(255,255,255,0.06);
            padding: 12px 0;
        }
        .comms-context-section-title {
            font-size: 11px;
            font-weight: 700;
            color: var(--text-muted);
            letter-spacing: 0.5px;
            text-transform: uppercase;
            margin-bottom: 8px;
        }
        .comms-context-contact { margin-bottom: 8px; }
        .comms-context-contact-name { font-size: 13px; color: var(--text-primary); }
        .comms-context-contact-title { font-size: 11px; color: var(--text-muted); }
        .comms-context-message { margin-bottom: 8px; }
        .comms-context-msg-dir { font-size: 11px; color: var(--text-muted); margin-bottom: 2px; }
        .comms-context-msg-preview { font-size: 12px; color: var(--text-secondary); }
        .comms-context-unknown { text-align: center; padding: 20px 0; }

        /* Shared Buttons */
        .comms-btn-primary {
            background: linear-gradient(135deg, var(--gold-primary), #c49a45);
            border: none;
            border-radius: 8px;
            padding: 8px 18px;
            color: #0a0a0b;
            font-weight: 600;
            font-size: 13px;
            cursor: pointer;
            display: inline-flex;
            align-items: center;
            gap: 6px;
            transition: all 0.2s;
        }
        .comms-btn-primary:hover { transform: translateY(-1px); box-shadow: 0 4px 15px rgba(212,168,83,0.3); }
        .comms-btn-cancel {
            background: transparent;
            border: 1px solid rgba(255,255,255,0.15);
            border-radius: 8px;
            padding: 8px 18px;
            color: var(--text-secondary);
            font-size: 13px;
            cursor: pointer;
        }
        .comms-btn-text {
            background: transparent;
            border: none;
            color: var(--text-muted);
            cursor: pointer;
            font-size: 12px;
            padding: 4px 8px;
        }
        .comms-btn-text:hover { color: var(--text-primary); }
        .comms-btn-small {
            padding: 6px 14px;
            border-radius: 6px;
            font-size: 12px;
            background: rgba(255,255,255,0.06);
            border: 1px solid rgba(255,255,255,0.1);
            color: var(--text-secondary);
            cursor: pointer;
            margin: 4px 0;
            display: block;
            width: 100%;
        }
        .comms-btn-small:hover { background: rgba(255,255,255,0.1); color: var(--text-primary); }
        .comms-btn-gold {
            background: rgba(212,168,83,0.12) !important;
            border-color: rgba(212,168,83,0.25) !important;
            color: var(--gold-primary) !important;
        }
        .comms-btn-gold:hover { background: rgba(212,168,83,0.2) !important; }

        /* Form Elements */
        .comms-select {
            background: rgba(0,0,0,0.3);
            border: 1px solid rgba(255,255,255,0.1);
            border-radius: 8px;
            padding: 7px 10px;
            color: var(--text-primary);
            font-size: 13px;
            outline: none;
        }
        .comms-select:focus { border-color: rgba(212,168,83,0.3); }
        .comms-input {
            background: rgba(0,0,0,0.3);
            border: 1px solid rgba(255,255,255,0.1);
            border-radius: 8px;
            padding: 9px 12px;
            color: var(--text-primary);
            font-size: 13px;
            outline: none;
            width: 100%;
            box-sizing: border-box;
        }
        .comms-input:focus { border-color: rgba(212,168,83,0.3); }
        .comms-textarea {
            background: rgba(0,0,0,0.3);
            border: 1px solid rgba(255,255,255,0.1);
            border-radius: 8px;
            padding: 12px;
            color: var(--text-primary);
            font-size: 14px;
            font-family: inherit;
            resize: vertical;
            outline: none;
            width: 100%;
            box-sizing: border-box;
        }
        .comms-textarea:focus { border-color: rgba(212,168,83,0.3); }

        /* Intake Agent Badges — Email List */
        .comms-priority-dot {
            width: 8px;
            height: 8px;
            border-radius: 50%;
            display: inline-block;
            flex-shrink: 0;
            box-shadow: 0 0 4px currentColor;
        }
        .comms-email-category-badge {
            font-size: 10px;
            padding: 1px 7px;
            border-radius: 10px;
            font-weight: 500;
            white-space: nowrap;
        }
        .comms-email-member-badge {
            font-size: 10px;
            padding: 1px 7px;
            border-radius: 10px;
            background: rgba(212,168,83,0.12);
            color: var(--gold-primary);
            border: 1px solid rgba(212,168,83,0.25);
            white-space: nowrap;
            display: inline-flex;
            align-items: center;
            gap: 2px;
        }

        /* Intake Banner — Email Viewer */
        .comms-intake-banner {
            margin: 0 28px;
            padding: 12px 16px;
            background: rgba(255,255,255,0.02);
            border: 1px solid rgba(255,255,255,0.06);
            border-radius: 10px;
            font-size: 12px;
        }
        .comms-intake-row {
            display: flex;
            align-items: center;
            gap: 8px;
            flex-wrap: wrap;
        }
        .comms-intake-priority {
            font-weight: 700;
            text-transform: uppercase;
            font-size: 11px;
            letter-spacing: 0.5px;
        }
        .comms-intake-divider {
            color: var(--text-muted);
            opacity: 0.3;
        }
        .comms-intake-category {
            color: var(--text-secondary);
        }
        .comms-intake-sentiment {
            color: var(--text-muted);
        }
        .comms-intake-action {
            margin-left: auto;
            color: var(--gold-primary);
            font-weight: 600;
            font-size: 11px;
            padding: 2px 8px;
            background: rgba(212,168,83,0.08);
            border-radius: 6px;
        }
        .comms-intake-summary {
            color: var(--text-secondary);
            margin-top: 8px;
            line-height: 1.5;
            font-size: 13px;
        }
        .comms-intake-labels {
            display: flex;
            gap: 4px;
            margin-top: 8px;
            flex-wrap: wrap;
        }
        .comms-intake-label {
            font-size: 10px;
            padding: 2px 8px;
            border-radius: 4px;
            background: rgba(255,255,255,0.04);
            color: var(--text-muted);
            border: 1px solid rgba(255,255,255,0.06);
        }

        /* Member Badge — Viewer Header */
        .comms-viewer-member-badge {
            font-size: 11px;
            color: var(--gold-primary);
            display: inline-flex;
            align-items: center;
            gap: 4px;
            padding: 2px 10px;
            border-radius: 12px;
            background: rgba(212,168,83,0.08);
            border: 1px solid rgba(212,168,83,0.2);
            white-space: nowrap;
        }

        /* Filter Row */
        .comms-filter-row {
            display: flex;
            gap: 6px;
            padding: 6px 12px;
            border-bottom: 1px solid rgba(255,255,255,0.04);
            flex-shrink: 0;
        }
        .comms-filter-select {
            flex: 1;
            font-size: 11px;
            padding: 4px 8px;
            border-radius: 6px;
            background: rgba(255,255,255,0.04);
            color: var(--text-secondary);
            border: 1px solid rgba(255,255,255,0.06);
            outline: none;
            cursor: pointer;
            appearance: none;
            -webkit-appearance: none;
            background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%23888'/%3E%3C/svg%3E");
            background-repeat: no-repeat;
            background-position: right 6px center;
            padding-right: 20px;
        }
        .comms-filter-select:focus { border-color: rgba(212,168,83,0.3); }
        .comms-filter-select option { background: #1a1a2e; color: var(--text-primary); }

        /* Compose Modal */
        .comms-compose-modal {
            position: fixed;
            inset: 0;
            background: rgba(0,0,0,0.85);
            backdrop-filter: blur(8px);
            display: flex;
            align-items: center;
            justify-content: center;
            z-index: 100000;
            padding: 2rem;
        }
        .comms-compose-content {
            background: linear-gradient(180deg, #12121a 0%, #0a0a10 100%);
            border: 1px solid rgba(212,168,83,0.2);
            border-radius: 16px;
            width: 100%;
            max-width: 700px;
            max-height: 85vh;
            overflow: hidden;
            display: flex;
            flex-direction: column;
        }
        .comms-compose-header {
            padding: 16px 20px;
            border-bottom: 1px solid rgba(255,255,255,0.06);
            display: flex;
            align-items: center;
            justify-content: space-between;
            background: rgba(0,0,0,0.3);
        }
        .comms-compose-title {
            font-family: 'Space Grotesk', sans-serif;
            font-size: 1.1rem;
            color: var(--gold-primary);
        }
        .comms-compose-close {
            background: transparent;
            border: none;
            color: var(--text-muted);
            cursor: pointer;
            padding: 6px;
            border-radius: 6px;
        }
        .comms-compose-close:hover { background: rgba(255,255,255,0.08); color: var(--text-primary); }
        .comms-compose-body {
            flex: 1;
            overflow-y: auto;
            padding: 20px;
            display: flex;
            flex-direction: column;
            gap: 14px;
        }
        .comms-compose-field { display: flex; flex-direction: column; gap: 5px; }
        .comms-compose-field label {
            font-size: 12px;
            color: var(--text-muted);
            letter-spacing: 0.03em;
        }
        .comms-compose-footer {
            padding: 14px 20px;
            border-top: 1px solid rgba(255,255,255,0.06);
            display: flex;
            justify-content: flex-end;
            gap: 10px;
            background: rgba(0,0,0,0.2);
        }
        /* AI Draft Button */
        .comms-reply-draft-row {
            display: flex;
            align-items: center;
            gap: 10px;
            margin-bottom: 10px;
        }
        .comms-btn-draft {
            display: inline-flex;
            align-items: center;
            gap: 6px;
            padding: 6px 14px;
            background: rgba(139,92,246,0.12);
            border: 1px solid rgba(139,92,246,0.25);
            border-radius: 8px;
            color: #a78bfa;
            font-size: 12px;
            font-weight: 600;
            cursor: pointer;
            transition: all 0.2s;
            white-space: nowrap;
        }
        .comms-btn-draft:hover {
            background: rgba(139,92,246,0.2);
            border-color: rgba(139,92,246,0.4);
            transform: translateY(-1px);
        }
        .comms-btn-draft:disabled {
            opacity: 0.5;
            cursor: not-allowed;
            transform: none;
        }
        .comms-draft-icon { font-size: 14px; }
        .comms-spinner-inline {
            display: inline-block;
            width: 12px;
            height: 12px;
            border: 2px solid rgba(212,168,83,0.3);
            border-top-color: var(--gold-primary);
            border-radius: 50%;
            animation: commsSpin 0.8s linear infinite;
        }

        /* Context Quality Badge */
        .comms-quality-badge {
            font-size: 10px;
            font-weight: 700;
            padding: 2px 8px;
            border-radius: 10px;
            letter-spacing: 0.3px;
            text-transform: uppercase;
        }
        .comms-quality-badge.quality-excellent {
            background: rgba(34,197,94,0.12);
            color: #22c55e;
            border: 1px solid rgba(34,197,94,0.25);
        }
        .comms-quality-badge.quality-good {
            background: rgba(59,130,246,0.12);
            color: #3b82f6;
            border: 1px solid rgba(59,130,246,0.25);
        }
        .comms-quality-badge.quality-fair {
            background: rgba(245,158,11,0.12);
            color: #f59e0b;
            border: 1px solid rgba(245,158,11,0.25);
        }
        .comms-quality-badge.quality-poor,
        .comms-quality-badge.quality-none {
            background: rgba(107,114,128,0.12);
            color: #6b7280;
            border: 1px solid rgba(107,114,128,0.25);
        }

        /* Queue Mode */
        .comms-queue-bar {
            display: flex;
            align-items: center;
            justify-content: space-between;
            padding: 8px 14px;
            background: linear-gradient(135deg, rgba(212,168,83,0.08), rgba(139,92,246,0.06));
            border-bottom: 1px solid rgba(212,168,83,0.15);
            flex-shrink: 0;
            gap: 10px;
        }
        .comms-queue-position {
            display: flex;
            flex-direction: column;
            gap: 2px;
            min-width: 60px;
        }
        .comms-queue-counter {
            font-size: 13px;
            font-weight: 700;
            color: var(--gold-primary);
        }
        .comms-queue-remaining {
            font-size: 10px;
            color: var(--text-muted);
        }
        .comms-queue-actions {
            display: flex;
            gap: 6px;
            flex-wrap: wrap;
            flex: 1;
            justify-content: center;
        }
        .comms-queue-action-btn {
            padding: 5px 10px;
            border-radius: 6px;
            font-size: 11px;
            font-weight: 600;
            cursor: pointer;
            border: 1px solid rgba(255,255,255,0.1);
            background: rgba(255,255,255,0.04);
            color: var(--text-secondary);
            transition: all 0.15s;
            display: inline-flex;
            align-items: center;
            gap: 4px;
            white-space: nowrap;
        }
        .comms-queue-action-btn:hover {
            background: rgba(255,255,255,0.08);
            color: var(--text-primary);
            transform: translateY(-1px);
        }
        .comms-queue-action-btn.draft {
            background: rgba(139,92,246,0.12);
            border-color: rgba(139,92,246,0.25);
            color: #a78bfa;
        }
        .comms-queue-action-btn.draft:hover {
            background: rgba(139,92,246,0.2);
        }
        .comms-queue-action-btn.archive-btn {
            background: rgba(59,130,246,0.08);
            border-color: rgba(59,130,246,0.2);
            color: #60a5fa;
        }
        .comms-queue-action-btn.archive-btn:hover {
            background: rgba(59,130,246,0.15);
        }
        .comms-queue-exit {
            background: transparent;
            border: none;
            color: var(--text-muted);
            font-size: 11px;
            cursor: pointer;
            padding: 4px 8px;
            border-radius: 4px;
            transition: all 0.15s;
            white-space: nowrap;
        }
        .comms-queue-exit:hover {
            background: rgba(255,255,255,0.06);
            color: var(--text-secondary);
        }
        .comms-queue-toggle.active {
            background: rgba(212,168,83,0.15) !important;
            border-color: var(--gold-primary) !important;
            color: var(--gold-primary) !important;
        }

        /* Outreach Mode */
        .comms-outreach-compose {
            padding: 20px 28px;
            display: flex;
            flex-direction: column;
            gap: 14px;
            overflow-y: auto;
            flex: 1;
        }
        .comms-outreach-footer {
            display: flex;
            justify-content: flex-end;
            gap: 10px;
            padding-top: 12px;
            border-top: 1px solid rgba(255,255,255,0.06);
        }
        .comms-outreach-filter-row {
            padding: 8px 14px;
            border-bottom: 1px solid rgba(255,255,255,0.06);
            display: flex;
            align-items: center;
            justify-content: space-between;
        }
        .comms-outreach-count {
            font-size: 11px;
            color: var(--text-muted);
            font-weight: 600;
        }
        .comms-outreach-research-badge {
            font-size: 10px;
            padding: 1px 6px;
            border-radius: 4px;
            background: rgba(34,197,94,0.12);
            color: #22c55e;
            border: 1px solid rgba(34,197,94,0.25);
        }

        /* ── Contact Selector (outreach) ── */
        .comms-contact-selector {
            display: flex;
            flex-direction: column;
            gap: 6px;
            margin-bottom: 4px;
        }
        .comms-contact-card {
            display: flex;
            align-items: center;
            justify-content: space-between;
            padding: 8px 12px;
            border-radius: 8px;
            border: 1px solid rgba(255,255,255,0.07);
            background: rgba(255,255,255,0.03);
            cursor: pointer;
            transition: border-color 0.15s, background 0.15s;
        }
        .comms-contact-card:hover {
            background: rgba(255,255,255,0.06);
            border-color: rgba(212,168,83,0.25);
        }
        .comms-contact-card.comms-contact-card-active {
            border-color: rgba(212,168,83,0.5);
            background: rgba(212,168,83,0.06);
        }
        .comms-contact-card-info {
            display: flex;
            flex-direction: column;
            gap: 2px;
            min-width: 0;
        }
        .comms-contact-card-name {
            font-size: 13px;
            font-weight: 600;
            color: var(--text-primary);
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
        }
        .comms-contact-card-title {
            font-size: 10px;
            color: var(--text-muted);
        }
        .comms-contact-card-email {
            font-size: 11px;
            color: var(--text-secondary);
        }
        .comms-contact-research-pill {
            flex-shrink: 0;
            font-size: 10px;
            padding: 2px 8px;
            border-radius: 20px;
            background: rgba(255,255,255,0.05);
            color: var(--text-muted);
            border: 1px solid rgba(255,255,255,0.1);
            white-space: nowrap;
        }
        .comms-contact-research-pill.researched {
            background: rgba(34,197,94,0.1);
            color: #22c55e;
            border-color: rgba(34,197,94,0.25);
        }

        /* ── Opportunity Score Badge (outreach list) ── */
        .comms-opportunity-badge {
            flex-shrink: 0;
            font-size: 9px;
            font-weight: 700;
            padding: 2px 6px;
            border-radius: 20px;
            letter-spacing: 0.03em;
            white-space: nowrap;
        }
        .comms-opportunity-high {
            background: rgba(34,197,94,0.12);
            color: #22c55e;
            border: 1px solid rgba(34,197,94,0.3);
        }
        .comms-opportunity-med {
            background: rgba(251,191,36,0.1);
            color: #fbbf24;
            border: 1px solid rgba(251,191,36,0.25);
        }
        .comms-opportunity-low {
            background: rgba(255,255,255,0.05);
            color: var(--text-muted);
            border: 1px solid rgba(255,255,255,0.1);
        }
        .comms-outreach-coverage {
            font-size: 10px;
            color: var(--text-muted);
            padding: 1px 5px;
            border-radius: 4px;
            background: rgba(255,255,255,0.04);
        }
        .comms-outreach-meta-snippet {
            font-size: 10px;
            color: var(--text-muted);
            margin-top: 2px;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
        }

        /* ── Contact Research Button (in context panel) ── */
        .comms-context-research-btn {
            flex-shrink: 0;
            background: rgba(96,165,250,0.1);
            border: 1px solid rgba(96,165,250,0.25);
            color: #60a5fa;
            border-radius: 5px;
            padding: 2px 7px;
            font-size: 11px;
            cursor: pointer;
            transition: background 0.15s;
        }
        .comms-context-research-btn:hover { background: rgba(96,165,250,0.2); }
        .comms-context-refresh-btn {
            background: none;
            border: none;
            color: var(--text-muted);
            cursor: pointer;
            font-size: 13px;
            padding: 0 2px;
            opacity: 0.6;
            transition: opacity 0.15s;
        }
        .comms-context-refresh-btn:hover { opacity: 1; }

        /* ── Workflow Commander ── */
        .comms-wf-command-bar {
            padding: 10px 14px;
            border-bottom: 1px solid rgba(255,255,255,0.06);
        }
        .comms-wf-input-row {
            display: flex;
            align-items: center;
            gap: 8px;
            background: rgba(212,168,83,0.05);
            border: 1px solid rgba(212,168,83,0.2);
            border-radius: 8px;
            padding: 6px 10px;
        }
        .comms-wf-icon {
            color: var(--gold-primary);
            font-size: 14px;
            flex-shrink: 0;
        }
        .comms-wf-input {
            flex: 1;
            background: none;
            border: none;
            color: var(--text-primary);
            font-size: 12px;
            outline: none;
            font-family: inherit;
        }
        .comms-wf-input::placeholder { color: var(--text-muted); }
        .comms-wf-go {
            flex-shrink: 0;
            background: var(--gold-primary);
            color: #000;
            border: none;
            border-radius: 5px;
            padding: 4px 12px;
            font-size: 11px;
            font-weight: 700;
            cursor: pointer;
        }
        .comms-wf-go:hover { opacity: 0.85; }
        .comms-wf-parsing {
            display: flex;
            align-items: center;
            gap: 8px;
            padding: 20px;
            justify-content: center;
            color: var(--text-secondary);
            font-size: 13px;
        }
        .comms-wf-plan {
            padding: 14px;
        }
        .comms-wf-plan-header { margin-bottom: 10px; }
        .comms-wf-plan-title {
            font-size: 13px;
            font-weight: 700;
            color: var(--gold-primary);
            margin-bottom: 4px;
        }
        .comms-wf-plan-brief {
            font-size: 12px;
            color: var(--text-secondary);
            line-height: 1.4;
        }
        .comms-wf-plan-filters {
            font-size: 11px;
            color: var(--text-muted);
            padding: 6px 10px;
            background: rgba(255,255,255,0.03);
            border-radius: 5px;
            margin-bottom: 12px;
        }
        .comms-wf-plan-steps { margin-bottom: 14px; }
        .comms-wf-plan-actions {
            display: flex;
            gap: 8px;
            justify-content: flex-end;
        }
        .comms-wf-progress { padding: 14px; }
        .comms-wf-progress-title {
            font-size: 12px;
            font-weight: 600;
            color: var(--text-secondary);
            margin-bottom: 12px;
        }
        .comms-wf-step {
            display: flex;
            align-items: center;
            gap: 8px;
            padding: 8px 10px;
            border-radius: 6px;
            margin-bottom: 4px;
            font-size: 12px;
        }
        .comms-wf-step-icon { width: 18px; text-align: center; flex-shrink: 0; }
        .comms-wf-step-label { color: var(--text-primary); }
        .comms-wf-step-detail {
            margin-left: auto;
            font-size: 10px;
            color: var(--text-muted);
            flex-shrink: 0;
        }
        .comms-wf-step-num {
            width: 18px;
            height: 18px;
            border-radius: 50%;
            background: rgba(255,255,255,0.06);
            display: inline-flex;
            align-items: center;
            justify-content: center;
            font-size: 10px;
            color: var(--text-muted);
            font-weight: 700;
        }
        .comms-wf-step-waiting { opacity: 0.5; }
        .comms-wf-step-running {
            background: rgba(212,168,83,0.06);
            border: 1px solid rgba(212,168,83,0.15);
        }
        .comms-wf-step-running .comms-wf-step-label { color: var(--gold-primary); }
        .comms-wf-step-done .comms-wf-step-icon { color: var(--success); }
        .comms-wf-step-error { background: rgba(248,113,113,0.06); }
        .comms-wf-step-error .comms-wf-step-icon { color: var(--error); }
        .comms-wf-step-error .comms-wf-step-detail { color: var(--error); }

        /* ── Workflow Review Mode ── */
        /* ── Outreach Activity Stats ── */
        .comms-outreach-stats-row {
            display: flex;
            gap: 2px;
            padding: 8px 14px;
            border-bottom: 1px solid rgba(255,255,255,0.05);
        }
        .comms-outreach-stat {
            flex: 1;
            display: flex;
            flex-direction: column;
            align-items: center;
            gap: 2px;
            padding: 6px 4px;
            border-radius: 6px;
            background: rgba(255,255,255,0.02);
        }
        .comms-outreach-stat-num {
            font-size: 16px;
            font-weight: 700;
            color: var(--text-primary);
            line-height: 1;
        }
        .comms-outreach-stat-label {
            font-size: 9px;
            color: var(--text-muted);
            text-transform: uppercase;
            letter-spacing: 0.03em;
        }

        /* ── Email Quality + Response Badges ── */
        .comms-email-quality-badge {
            font-size: 9px;
            padding: 1px 5px;
            border-radius: 3px;
            margin-left: 4px;
            vertical-align: middle;
        }
        .comms-email-quality-badge.guessed {
            background: rgba(245,158,11,0.1);
            color: #f59e0b;
            border: 1px solid rgba(245,158,11,0.2);
        }
        .comms-email-quality-badge.generic {
            background: rgba(255,255,255,0.05);
            color: var(--text-muted);
            border: 1px solid rgba(255,255,255,0.1);
        }
        .comms-response-badge {
            font-size: 9px;
            padding: 1px 5px;
            border-radius: 3px;
            white-space: nowrap;
        }
        .comms-response-badge.responded { background: rgba(34,197,94,0.1); color: #22c55e; }
        .comms-response-badge.recent { background: rgba(96,165,250,0.1); color: #60a5fa; }
        .comms-response-badge.waiting { background: rgba(245,158,11,0.1); color: #f59e0b; }
        .comms-response-badge.stale { background: rgba(248,113,113,0.1); color: #f87171; }

        /* ── Draft Quality Flags ── */
        .comms-wf-quality-flags {
            display: flex;
            flex-wrap: wrap;
            gap: 4px;
            padding: 0 12px 8px;
        }
        .comms-wf-quality-flag {
            font-size: 9px;
            padding: 2px 6px;
            border-radius: 3px;
            background: rgba(245,158,11,0.08);
            color: #f59e0b;
            border: 1px solid rgba(245,158,11,0.2);
        }

        .comms-wf-enrich-btn {
            margin-left: auto;
            background: rgba(96,165,250,0.08);
            border: 1px solid rgba(96,165,250,0.2);
            color: #60a5fa;
            border-radius: 5px;
            padding: 3px 10px;
            font-size: 11px;
            cursor: pointer;
            transition: background 0.15s;
        }
        .comms-wf-enrich-btn:hover { background: rgba(96,165,250,0.15); }
        .comms-wf-enrich-btn:disabled { opacity: 0.5; cursor: not-allowed; }

        .comms-outreach-footer kbd {
            font-size: 9px;
            padding: 1px 4px;
            border-radius: 3px;
            background: rgba(255,255,255,0.08);
            border: 1px solid rgba(255,255,255,0.15);
            font-family: monospace;
            margin-left: 3px;
            opacity: 0.6;
        }
        .comms-wf-review-active { background: rgba(212,168,83,0.06) !important; border-left: 2px solid var(--gold-primary); }
        .comms-wf-review-approved { border-left: 2px solid var(--success); }
        .comms-wf-review-skipped { opacity: 0.4; border-left: 2px solid transparent; }
        .comms-wf-review-pending { border-left: 2px solid transparent; }

        /* ── Review List Item Parts ── */
        .comms-wf-status-icon { width: 18px; text-align: center; flex-shrink: 0; font-size: 11px; }
        .comms-wf-review-approved .comms-wf-status-icon { color: var(--success); }
        .comms-wf-org-name { font-size: 12px; font-weight: 600; color: var(--text-primary); }
        .comms-wf-review-active .comms-wf-org-name { color: var(--gold-primary); }
        .comms-wf-contact-line { font-size: 10px; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
        .comms-wf-send-actions { padding: 12px; display: flex; gap: 8px; }
        .comms-wf-input--status { color: var(--text-secondary); padding: 8px; pointer-events: none; }

        /* ── Compose Field Parts ── */
        .comms-compose-to-value { font-size: 13px; color: var(--text-secondary); padding: 6px 0; }
        .comms-word-count { font-size: 10px; color: var(--text-muted); font-weight: 400; }

        /* ── Persona Badge ── */
        .comms-persona-badge {
            font-size: 10px;
            font-weight: 400;
            color: var(--info);
            background: var(--info-bg);
            border: 1px solid rgba(96,165,250,0.25);
            border-radius: 4px;
            padding: 1px 5px;
            margin-left: 6px;
            vertical-align: middle;
        }

        /* ── BenOS Score Bar ── */
        .comms-benos-score {
            display: flex;
            align-items: center;
            gap: 8px;
            padding: 4px 12px;
            background: rgba(0,0,0,0.15);
            border-radius: 6px;
            margin: 0 12px;
        }
        .comms-benos-score-label { font-size: 11px; color: var(--text-muted); }
        .comms-benos-score-grade { font-weight: 600; }
        .comms-benos-score-grade.grade-a { color: var(--success); }
        .comms-benos-score-grade.grade-b { color: var(--gold-primary); }
        .comms-benos-score-grade.grade-c { color: var(--error); }
        .comms-benos-violations { flex: 1; }
        .comms-benos-violation { font-size: 10px; color: var(--text-muted); padding: 1px 0; }

        /* ── Button Variants ── */
        .comms-btn-draft {
            color: var(--info) !important;
            border-color: rgba(96,165,250,0.3) !important;
        }
        .comms-btn-draft:hover { background: rgba(96,165,250,0.08) !important; }
        .comms-btn-approve {
            background: var(--success) !important;
            border-color: var(--success) !important;
            color: #0a0a0b !important;
        }
        .comms-btn-approve:hover { opacity: 0.9; transform: translateY(-1px); }
        .comms-btn-xs {
            padding: 4px 10px !important;
            font-size: 11px !important;
            border-radius: 5px !important;
        }

        /* ── Keyboard Shortcut Hint ── */
        .comms-kbd-hint {
            text-align: center;
            padding: 2px 0 4px;
            font-size: 9px;
            color: var(--text-muted);
            opacity: 0.5;
        }

        /* ── Master Queue ── */
        .comms-master-queue-btn {
            flex-shrink: 0;
            display: inline-flex;
            align-items: center;
            gap: 5px;
            background: rgba(212,168,83,0.12);
            border: 1px solid rgba(212,168,83,0.3);
            border-radius: 5px;
            padding: 3px 10px;
            font-size: 11px;
            font-weight: 600;
            color: var(--gold-primary);
            cursor: pointer;
            transition: background 0.15s;
        }
        .comms-master-queue-btn:hover { background: rgba(212,168,83,0.2); }
        .comms-master-queue-btn.has-below-target { border-color: rgba(248,113,113,0.4); }
        .comms-master-queue-btn.has-below-target::after {
            content: '';
            width: 5px; height: 5px;
            background: var(--error);
            border-radius: 50%;
            display: inline-block;
            margin-left: 2px;
        }
        .comms-master-queue-count {
            background: rgba(212,168,83,0.2);
            border-radius: 9px;
            padding: 0 6px;
            font-size: 10px;
        }
        .comms-mq-header {
            padding: 10px 14px 6px;
            border-bottom: 1px solid rgba(255,255,255,0.06);
        }
        .comms-mq-title {
            font-size: 13px;
            font-weight: 700;
            color: var(--gold-primary);
            margin-bottom: 4px;
        }
        .comms-mq-summary { font-size: 11px; color: var(--text-muted); margin-bottom: 8px; }
        .comms-mq-below-badge {
            background: rgba(248,113,113,0.12);
            color: var(--error);
            border-radius: 3px;
            padding: 1px 5px;
            font-size: 10px;
        }
        .comms-mq-filter-row { display: flex; gap: 4px; }
        .comms-mq-filter-btn {
            background: transparent;
            border: 1px solid rgba(255,255,255,0.1);
            border-radius: 4px;
            padding: 2px 8px;
            font-size: 10px;
            color: var(--text-muted);
            cursor: pointer;
        }
        .comms-mq-filter-btn:hover { color: var(--text-primary); border-color: rgba(255,255,255,0.2); }
        .comms-mq-filter-active { color: var(--gold-primary) !important; border-color: rgba(212,168,83,0.4) !important; }
        .comms-mq-campaign-label {
            font-size: 10px;
            font-weight: 600;
            color: var(--text-muted);
            padding: 8px 14px 4px;
            text-transform: uppercase;
            letter-spacing: 0.04em;
            border-top: 1px solid rgba(255,255,255,0.04);
        }
        .comms-mq-row {
            display: flex;
            align-items: center;
            gap: 10px;
            padding: 8px 14px;
            border-bottom: 1px solid rgba(255,255,255,0.03);
            cursor: pointer;
            transition: background 0.1s;
        }
        .comms-mq-row:hover { background: rgba(255,255,255,0.03); }
        .comms-mq-row.mq-approved { border-left: 2px solid var(--success); }
        .comms-mq-score {
            width: 36px;
            flex-shrink: 0;
            text-align: center;
            font-size: 11px;
            font-weight: 700;
            border-radius: 4px;
            padding: 2px 0;
        }
        .comms-mq-score.grade-a { background: rgba(74,222,128,0.12); color: var(--success); }
        .comms-mq-score.grade-b { background: rgba(212,168,83,0.12); color: var(--gold-primary); }
        .comms-mq-score.grade-c { background: rgba(248,113,113,0.12); color: var(--error); }
        .comms-mq-recv-score { width: 30px; font-size: 10px; opacity: 0.75; }
        .comms-recv-feedback {
            font-size: 11px;
            color: var(--text-secondary);
            padding: 6px 10px;
            background: rgba(255,255,255,0.03);
            border-left: 2px solid var(--text-muted);
            border-radius: 0 4px 4px 0;
            margin-bottom: 8px;
            line-height: 1.5;
        }
        .comms-recv-feedback-label { font-weight: 600; margin-right: 4px; }
        .comms-mq-info { min-width: 0; flex: 1; }
        .comms-mq-org { font-size: 12px; font-weight: 600; color: var(--text-primary); }
        .comms-mq-subject { font-size: 10px; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
        .comms-mq-approved-tick { color: var(--success); font-size: 12px; flex-shrink: 0; }

        /* ── Research Progress (inline in intel panel) ── */
        .comms-research-progress {
            display: flex;
            flex-direction: column;
            align-items: center;
            gap: 6px;
            padding: 14px;
            border-radius: 6px;
            background: rgba(96,165,250,0.05);
            border: 1px solid rgba(96,165,250,0.15);
            text-align: center;
        }

        /* ── Send Confirmation ── */
        .comms-send-confirm {
            display: flex;
            flex-direction: column;
            gap: 10px;
            padding: 12px;
            border-radius: 8px;
            background: rgba(212,168,83,0.06);
            border: 1px solid rgba(212,168,83,0.2);
            width: 100%;
        }
        .comms-send-confirm-info {
            display: flex;
            flex-wrap: wrap;
            align-items: center;
            gap: 6px;
            font-size: 12px;
        }
        .comms-send-confirm-label {
            color: var(--text-muted);
            font-weight: 600;
        }
        .comms-send-confirm-contact {
            color: var(--text-primary);
            font-weight: 600;
        }
        .comms-send-confirm-email {
            color: var(--text-secondary);
        }
        .comms-send-confirm-subject {
            color: var(--text-muted);
            font-style: italic;
            flex-basis: 100%;
            margin-top: 2px;
        }
        .comms-send-confirm-actions {
            display: flex;
            gap: 8px;
            justify-content: flex-end;
        }

        /* ── Attachment Upload ── */
        .comms-field-label-row {
            display: flex;
            align-items: center;
            gap: 10px;
        }
        .comms-field-label-row > label:first-child {
            font-size: 12px;
            color: var(--text-muted);
            letter-spacing: 0.03em;
        }
        .comms-attach-btn {
            display: inline-flex;
            align-items: center;
            gap: 4px;
            padding: 3px 10px;
            background: rgba(255,255,255,0.04);
            border: 1px solid rgba(255,255,255,0.1);
            border-radius: 6px;
            color: var(--text-muted);
            font-size: 11px;
            cursor: pointer;
            transition: all 0.15s;
        }
        .comms-attach-btn:hover {
            background: rgba(212,168,83,0.1);
            border-color: rgba(212,168,83,0.25);
            color: var(--gold-primary);
        }
        .comms-reply-attach-row {
            display: flex;
            align-items: center;
            gap: 8px;
            margin-bottom: 8px;
        }
        .comms-file-preview-list {
            display: flex;
            flex-direction: column;
            gap: 6px;
            margin-top: 8px;
        }
        .comms-file-preview-item {
            display: flex;
            align-items: center;
            gap: 10px;
            padding: 8px 10px;
            background: rgba(255,255,255,0.03);
            border: 1px solid rgba(255,255,255,0.06);
            border-radius: 8px;
        }
        .comms-file-preview-thumb {
            width: 36px;
            height: 36px;
            object-fit: cover;
            border-radius: 6px;
            border: 1px solid rgba(255,255,255,0.08);
        }
        .comms-file-preview-ext {
            width: 36px;
            height: 36px;
            display: flex;
            align-items: center;
            justify-content: center;
            background: rgba(212,168,83,0.08);
            border: 1px solid rgba(212,168,83,0.15);
            border-radius: 6px;
            font-size: 9px;
            font-weight: 700;
            color: var(--gold-primary);
            text-transform: uppercase;
        }
        .comms-file-preview-info {
            flex: 1;
            min-width: 0;
        }
        .comms-file-preview-name {
            font-size: 12px;
            color: var(--text-secondary);
            display: block;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
        }
        .comms-file-preview-size {
            font-size: 10px;
            color: var(--text-muted);
            display: block;
            margin-top: 1px;
        }
        .comms-file-preview-remove {
            background: transparent;
            border: none;
            color: var(--text-muted);
            font-size: 18px;
            cursor: pointer;
            padding: 2px 6px;
            border-radius: 4px;
            line-height: 1;
        }
        .comms-file-preview-remove:hover {
            background: rgba(239,68,68,0.15);
            color: #ef4444;
        }
        .comms-drag-over {
            border-color: rgba(212,168,83,0.4) !important;
            background: rgba(212,168,83,0.05) !important;
            box-shadow: 0 0 0 3px rgba(212,168,83,0.1) !important;
        }

        /* ── Attachment Download & Preview ── */
        .comms-attach-card { position: relative; }
        .comms-attach-card-link {
            text-decoration: none;
            color: inherit;
            display: flex;
            align-items: center;
            gap: 10px;
        }
        .comms-attach-card-image {
            flex-direction: column;
            align-items: stretch;
            padding: 0;
            overflow: hidden;
            cursor: pointer;
        }
        .comms-attach-card-image .comms-attach-info {
            padding: 8px 12px 10px;
        }
        .comms-attach-thumb {
            width: 100%;
            height: 100px;
            object-fit: cover;
            display: block;
        }
        .comms-attach-dl-btn {
            display: flex;
            align-items: center;
            justify-content: center;
            width: 28px;
            height: 28px;
            border-radius: 6px;
            background: rgba(255,255,255,0.04);
            color: var(--text-muted);
            flex-shrink: 0;
            transition: all 0.15s;
            border: none;
            cursor: pointer;
            text-decoration: none;
        }
        .comms-attach-dl-btn:hover {
            background: rgba(212,168,83,0.15);
            color: var(--gold-primary);
        }
        .comms-attach-card-image .comms-attach-dl-btn {
            position: absolute;
            top: 6px;
            right: 6px;
            background: rgba(0,0,0,0.6);
            backdrop-filter: blur(4px);
            opacity: 0;
            transition: opacity 0.15s;
        }
        .comms-attach-card-image:hover .comms-attach-dl-btn { opacity: 1; }

        /* ── Video Attachments ── */
        .comms-file-preview-video {
            width: 36px;
            height: 36px;
            object-fit: cover;
            border-radius: 6px;
            border: 1px solid rgba(16, 185, 129, 0.2);
            pointer-events: none;
        }
        .comms-attach-card-video {
            flex-direction: column;
            align-items: stretch;
            padding: 0;
            overflow: hidden;
            cursor: default;
        }
        .comms-attach-card-video video {
            width: 100%;
            max-height: 200px;
            display: block;
            background: #000;
        }
        .comms-attach-card-video .comms-attach-info { padding: 8px 12px 10px; }
        .comms-attach-card-video .comms-attach-dl-btn {
            position: absolute;
            top: 6px;
            right: 6px;
            background: rgba(0,0,0,0.6);
            backdrop-filter: blur(4px);
            opacity: 0;
            transition: opacity 0.15s;
        }
        .comms-attach-card-video:hover .comms-attach-dl-btn { opacity: 1; }
        .image-lightbox video {
            max-width: 90vw;
            max-height: 90vh;
            border-radius: 8px;
        }

        /* ── Response Tracking (Phase 4) ── */

        .comms-awaiting-badge {
            margin-left: 2px;
            font-size: 0.65rem;
            padding: 1px 5px;
            border-radius: 8px;
            min-width: 16px;
            text-align: center;
            font-weight: 700;
        }

        .comms-awaiting-panel {
            padding: 0;
            height: 100%;
            display: flex;
            flex-direction: column;
            overflow: hidden;
        }

        .comms-awaiting-header {
            display: flex;
            align-items: center;
            justify-content: space-between;
            padding: 16px 20px;
            border-bottom: 1px solid var(--border-subtle, #333);
            flex-shrink: 0;
        }

        .comms-awaiting-title {
            display: flex;
            align-items: center;
            gap: 10px;
        }

        .comms-awaiting-title h3 {
            margin: 0;
            font-size: 1rem;
            color: var(--text-primary, #f5f5f5);
        }

        .comms-awaiting-icon {
            font-size: 1.2rem;
        }

        .comms-awaiting-count {
            font-size: 0.75rem;
            color: var(--text-muted, #888);
            padding: 2px 8px;
            background: rgba(255,255,255,0.05);
            border-radius: 10px;
        }

        .comms-awaiting-empty {
            text-align: center;
            padding: 3rem 2rem;
            color: var(--text-muted, #888);
            font-size: 0.9rem;
        }

        .comms-awaiting-list {
            flex: 1;
            overflow-y: auto;
            padding: 8px 12px;
        }

        .comms-awaiting-item {
            display: flex;
            gap: 0;
            margin-bottom: 8px;
            border-radius: 10px;
            background: rgba(255,255,255,0.02);
            border: 1px solid var(--border-subtle, #333);
            overflow: hidden;
            transition: border-color 0.2s, background 0.2s;
        }

        .comms-awaiting-item:hover {
            background: rgba(255,255,255,0.04);
            border-color: rgba(255,255,255,0.1);
        }

        .comms-awaiting-urgency-bar {
            width: 4px;
            flex-shrink: 0;
            border-radius: 10px 0 0 10px;
        }

        .comms-urgency-yellow .comms-awaiting-urgency-bar { background: #f59e0b; }
        .comms-urgency-orange .comms-awaiting-urgency-bar { background: #f97316; }
        .comms-urgency-red .comms-awaiting-urgency-bar { background: #ef4444; }

        .comms-awaiting-content {
            flex: 1;
            padding: 12px 14px;
            min-width: 0;
        }

        .comms-awaiting-top {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 4px;
        }

        .comms-awaiting-org {
            font-size: 0.9rem;
            font-weight: 600;
            color: var(--text-primary, #f5f5f5);
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
        }

        .comms-awaiting-days {
            font-size: 0.8rem;
            font-weight: 700;
            flex-shrink: 0;
            margin-left: 8px;
        }

        .comms-urgency-yellow .comms-awaiting-days { color: #f59e0b; }
        .comms-urgency-orange .comms-awaiting-days { color: #f97316; }
        .comms-urgency-red .comms-awaiting-days { color: #ef4444; }

        .comms-awaiting-contact {
            font-size: 0.75rem;
            color: var(--text-secondary, #aaa);
            margin-bottom: 6px;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
        }

        .comms-awaiting-meta {
            display: flex;
            align-items: center;
            gap: 8px;
            margin-bottom: 8px;
            flex-wrap: wrap;
        }

        .comms-awaiting-channel {
            font-size: 0.7rem;
            padding: 1px 6px;
            border-radius: 4px;
            background: rgba(255,255,255,0.05);
            color: var(--text-muted, #888);
        }

        .comms-awaiting-subject {
            font-size: 0.75rem;
            color: var(--text-secondary, #aaa);
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
            max-width: 250px;
        }

        .comms-awaiting-date {
            font-size: 0.7rem;
            color: var(--text-muted, #888);
        }

        .comms-awaiting-actions {
            display: flex;
            gap: 6px;
            flex-wrap: wrap;
        }

        .comms-awaiting-btn {
            padding: 4px 10px;
            border-radius: 6px;
            font-size: 0.7rem;
            font-weight: 500;
            cursor: pointer;
            border: 1px solid;
            transition: all 0.15s;
            white-space: nowrap;
        }

        .comms-awaiting-btn-followup {
            background: rgba(212,168,83,0.1);
            border-color: rgba(212,168,83,0.3);
            color: #D4A853;
        }
        .comms-awaiting-btn-followup:hover {
            background: rgba(212,168,83,0.2);
            border-color: rgba(212,168,83,0.5);
        }

        .comms-awaiting-btn-responded {
            background: rgba(34,197,94,0.1);
            border-color: rgba(34,197,94,0.3);
            color: #22c55e;
        }
        .comms-awaiting-btn-responded:hover {
            background: rgba(34,197,94,0.2);
            border-color: rgba(34,197,94,0.5);
        }

        .comms-awaiting-btn-thread {
            background: rgba(59,130,246,0.1);
            border-color: rgba(59,130,246,0.3);
            color: #3b82f6;
        }
        .comms-awaiting-btn-thread:hover {
            background: rgba(59,130,246,0.2);
            border-color: rgba(59,130,246,0.5);
        }

        /* Response item snippet */
        .comms-response-snippet {
            font-size: 0.75rem;
            color: var(--text-muted, #888);
            margin-bottom: 8px;
            line-height: 1.4;
            display: -webkit-box;
            -webkit-line-clamp: 2;
            -webkit-box-orient: vertical;
            overflow: hidden;
        }

        /* Thread timeline view */
        .comms-thread-stage-badge {
            font-size: 0.7rem;
            padding: 2px 8px;
            border-radius: 6px;
            font-weight: 500;
        }

        .comms-thread-timeline {
            flex: 1;
            overflow-y: auto;
            padding: 16px 20px 16px 40px;
            position: relative;
        }

        .comms-thread-event {
            position: relative;
            padding-left: 24px;
            margin-bottom: 16px;
        }

        .comms-thread-event-line {
            position: absolute;
            left: 5px;
            top: 0;
            bottom: -16px;
            width: 2px;
            background: rgba(255,255,255,0.06);
        }

        .comms-thread-event:last-child .comms-thread-event-line {
            display: none;
        }

        .comms-thread-event-dot {
            position: absolute;
            left: 0;
            top: 8px;
            width: 12px;
            height: 12px;
            border-radius: 50%;
            border: 2px solid var(--bg-deep, #0f0f0f);
        }

        .comms-thread-event-card {
            background: rgba(255,255,255,0.02);
            border: 1px solid var(--border-subtle, #333);
            border-radius: 8px;
            padding: 10px 14px;
        }

        .comms-thread-event.outbound .comms-thread-event-card {
            border-left: 3px solid #D4A853;
        }

        .comms-thread-event.inbound .comms-thread-event-card {
            border-left: 3px solid #3b82f6;
        }

        .comms-thread-event-header {
            display: flex;
            align-items: center;
            gap: 8px;
            margin-bottom: 4px;
            flex-wrap: wrap;
        }

        .comms-thread-event-dir {
            font-size: 0.75rem;
            font-weight: 600;
        }

        .comms-thread-event-channel {
            font-size: 0.65rem;
            padding: 1px 6px;
            border-radius: 4px;
            border: 1px solid rgba(255,255,255,0.05);
        }

        .comms-thread-event-time {
            font-size: 0.65rem;
            color: var(--text-muted, #888);
            margin-left: auto;
        }

        .comms-thread-event-subject {
            font-size: 0.8rem;
            color: var(--text-primary, #f5f5f5);
            font-weight: 500;
            margin-bottom: 2px;
        }

        .comms-thread-event-contact {
            font-size: 0.7rem;
            color: var(--text-secondary, #aaa);
            margin-bottom: 4px;
        }

        .comms-thread-event-snippet {
            font-size: 0.75rem;
            color: var(--text-muted, #888);
            line-height: 1.4;
            display: -webkit-box;
            -webkit-line-clamp: 3;
            -webkit-box-orient: vertical;
            overflow: hidden;
        }

        /* ===== END COMMUNICATIONS CENTER STYLES ===== */

        .wz-send-modal-content {
            background: linear-gradient(180deg, #12121a 0%, #0a0a10 100%);
            border: 1px solid rgba(212,168,83,0.25);
            border-radius: 24px;
            width: 100%;
            max-width: 1000px;
            max-height: 85vh;
            overflow: hidden;
            display: flex;
            flex-direction: column;
            box-shadow: 0 30px 100px rgba(0,0,0,0.7);
        }
        .wz-send-modal-header {
            padding: 1.75rem 2rem;
            border-bottom: 1px solid rgba(255,255,255,0.06);
            display: flex;
            align-items: center;
            justify-content: space-between;
            background: rgba(0,0,0,0.35);
        }
        .wz-send-modal-title {
            font-family: 'Space Grotesk', sans-serif;
            font-size: 1.4rem;
            color: var(--gold-primary);
            display: flex;
            align-items: center;
            gap: 0.75rem;
        }
        .wz-send-modal-close {
            background: transparent;
            border: none;
            color: var(--text-muted);
            cursor: pointer;
            padding: 0.5rem;
            border-radius: 8px;
            transition: all 0.2s ease;
        }
        .wz-send-modal-close:hover {
            background: rgba(255,255,255,0.08);
            color: var(--text-primary);
        }
        .wz-send-modal-body {
            flex: 1;
            overflow-y: auto;
            display: grid;
            grid-template-columns: 1.2fr 1fr;
            gap: 0;
        }
        .wz-send-preview-pane {
            padding: 2rem;
            border-right: 1px solid rgba(255,255,255,0.06);
            background: rgba(0,0,0,0.25);
            overflow-y: auto;
            max-height: 60vh;
        }
        .wz-send-preview-label {
            font-size: 0.65rem;
            color: var(--gold-primary);
            letter-spacing: 0.12em;
            text-transform: uppercase;
            margin-bottom: 1rem;
            display: flex;
            align-items: center;
            gap: 0.5rem;
        }
        .wz-send-preview-card {
            background: linear-gradient(180deg, #0d0d14 0%, #08080c 100%);
            border: 1px solid rgba(212,168,83,0.15);
            border-radius: 16px;
            padding: 1.75rem;
            font-family: 'Inter', sans-serif;
            font-size: 0.95rem;
            line-height: 1.7;
            color: var(--text-secondary);
            max-height: 50vh;
            overflow-y: auto;
        }
        .wz-send-preview-card h1, .wz-send-preview-card h2, .wz-send-preview-card h3 {
            color: var(--gold-primary);
            margin: 1.5rem 0 0.75rem 0;
            font-family: 'Space Grotesk', sans-serif;
        }
        .wz-send-preview-card h1 { font-size: 1.4rem; }
        .wz-send-preview-card h2 { font-size: 1.15rem; }
        .wz-send-preview-card h3 { font-size: 1rem; }
        .wz-send-preview-card p { margin-bottom: 0.75rem; }
        .wz-send-preview-card strong { color: var(--text-primary); }
        .wz-send-config-pane {
            padding: 2rem;
            display: flex;
            flex-direction: column;
            gap: 1.5rem;
            overflow-y: auto;
        }
        .wz-send-section {
            display: flex;
            flex-direction: column;
            gap: 0.75rem;
        }
        .wz-send-section-label {
            font-size: 0.65rem;
            color: var(--gold-primary);
            letter-spacing: 0.1em;
            text-transform: uppercase;
            display: flex;
            align-items: center;
            gap: 0.5rem;
        }
        .wz-send-org-card {
            background: rgba(34,197,94,0.08);
            border: 1px solid rgba(34,197,94,0.2);
            border-radius: 12px;
            padding: 1.25rem;
            display: flex;
            align-items: center;
            gap: 1rem;
        }
        .wz-send-org-icon {
            width: 48px;
            height: 48px;
            border-radius: 12px;
            background: linear-gradient(135deg, rgba(34,197,94,0.2), rgba(34,197,94,0.1));
            display: flex;
            align-items: center;
            justify-content: center;
            color: #22c55e;
            font-size: 1.4rem;
        }
        .wz-send-org-info { flex: 1; }
        .wz-send-org-name {
            font-size: 1.1rem;
            color: var(--text-primary);
            font-weight: 500;
        }
        .wz-send-org-type {
            font-size: 0.8rem;
            color: var(--text-muted);
            margin-top: 0.25rem;
        }
        .wz-send-contacts-list {
            display: flex;
            flex-direction: column;
            gap: 0.5rem;
            max-height: 180px;
            overflow-y: auto;
        }
        .wz-send-contact-item {
            background: rgba(0,0,0,0.3);
            border: 1px solid rgba(255,255,255,0.08);
            border-radius: 10px;
            padding: 0.85rem 1rem;
            display: flex;
            align-items: center;
            gap: 0.85rem;
            cursor: pointer;
            transition: all 0.2s ease;
        }
        .wz-send-contact-item:hover {
            background: rgba(255,255,255,0.04);
            border-color: rgba(255,255,255,0.12);
        }
        .wz-send-contact-item.selected {
            background: rgba(212,168,83,0.08);
            border-color: rgba(212,168,83,0.25);
        }
        .wz-send-contact-item input[type="checkbox"] {
            width: 18px;
            height: 18px;
            accent-color: var(--gold-primary);
        }
        .wz-send-contact-info { flex: 1; }
        .wz-send-contact-name {
            font-size: 0.9rem;
            color: var(--text-primary);
        }
        .wz-send-contact-email {
            font-size: 0.75rem;
            color: var(--text-muted);
            margin-top: 0.15rem;
        }
        .wz-send-contact-role {
            font-size: 0.7rem;
            color: var(--gold-primary);
            background: rgba(212,168,83,0.1);
            padding: 0.2rem 0.5rem;
            border-radius: 4px;
        }
        .wz-send-contact-count {
            font-size: 0.75rem;
            color: var(--text-muted);
            margin-left: auto;
        }
        .wz-send-no-contacts {
            padding: 1.5rem;
            text-align: center;
            color: var(--text-muted);
            font-size: 0.85rem;
            background: rgba(0,0,0,0.2);
            border-radius: 10px;
        }
        .wz-send-options {
            display: flex;
            flex-direction: column;
            gap: 0.6rem;
        }
        .wz-send-option {
            display: flex;
            align-items: center;
            gap: 0.75rem;
            padding: 0.75rem 1rem;
            background: rgba(0,0,0,0.25);
            border-radius: 10px;
            cursor: pointer;
        }
        .wz-send-option input[type="checkbox"] {
            width: 18px;
            height: 18px;
            accent-color: var(--gold-primary);
        }
        .wz-send-option span {
            font-size: 0.9rem;
            color: var(--text-secondary);
        }
        .wz-send-message-field textarea {
            width: 100%;
            min-height: 90px;
            background: rgba(0,0,0,0.3);
            border: 1px solid rgba(255,255,255,0.1);
            border-radius: 10px;
            padding: 1rem;
            color: var(--text-primary);
            font-size: 0.9rem;
            font-family: inherit;
            resize: vertical;
        }
        .wz-send-message-field textarea:focus {
            outline: none;
            border-color: rgba(212,168,83,0.4);
        }
        .wz-send-modal-footer {
            padding: 1.5rem 2rem;
            border-top: 1px solid rgba(255,255,255,0.06);
            display: flex;
            justify-content: flex-end;
            gap: 0.75rem;
            background: rgba(0,0,0,0.3);
        }
        .wz-send-btn {
            padding: 0.85rem 1.75rem;
            border-radius: 10px;
            font-size: 0.95rem;
            font-weight: 500;
            cursor: pointer;
            display: flex;
            align-items: center;
            gap: 0.5rem;
            transition: all 0.2s ease;
            font-family: inherit;
        }
        .wz-send-btn.secondary {
            background: rgba(255,255,255,0.05);
            border: 1px solid rgba(255,255,255,0.15);
            color: var(--text-secondary);
        }
        .wz-send-btn.secondary:hover {
            background: rgba(255,255,255,0.1);
            color: var(--text-primary);
        }
        .wz-send-btn.primary {
            background: linear-gradient(135deg, var(--gold-primary), #c49a45);
            border: none;
            color: #0a0a0b;
            font-weight: 600;
        }
        .wz-send-btn.primary:hover {
            transform: translateY(-2px);
            box-shadow: 0 6px 25px rgba(212,168,83,0.35);
        }
        .wz-send-btn.primary:disabled {
            opacity: 0.5;
            cursor: not-allowed;
            transform: none;
            box-shadow: none;
        }
        .wz-send-summary {
            background: rgba(212,168,83,0.06);
            border: 1px solid rgba(212,168,83,0.15);
            border-radius: 12px;
            padding: 1rem 1.25rem;
            font-size: 0.85rem;
            color: var(--text-secondary);
            line-height: 1.6;
        }
        .wz-send-summary strong {
            color: var(--gold-primary);
        }
        
        /* Template Save Modal */
        .pd-template-modal {
            position: fixed;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background: rgba(0,0,0,0.8);
            display: none;
            align-items: center;
            justify-content: center;
            z-index: 10002;
        }
        .pd-template-modal.active {
            display: flex;
        }
        .pd-template-modal-content {
            background: linear-gradient(180deg, #16161e 0%, #0e0e14 100%);
            border: 1px solid rgba(212,168,83,0.2);
            border-radius: 16px;
            padding: 2rem;
            width: 100%;
            max-width: 450px;
        }
        .pd-template-modal-title {
            font-family: 'Space Grotesk', sans-serif;
            font-size: 1.2rem;
            color: var(--gold-primary);
            margin-bottom: 1.5rem;
        }
        .pd-template-field {
            margin-bottom: 1.25rem;
        }
        .pd-template-field label {
            font-size: 0.7rem;
            color: var(--text-muted);
            letter-spacing: 0.05em;
            margin-bottom: 0.5rem;
            display: block;
        }
        .pd-template-field input {
            width: 100%;
            background: rgba(0,0,0,0.3);
            border: 1px solid rgba(255,255,255,0.1);
            border-radius: 8px;
            padding: 0.85rem 1rem;
            color: var(--text-primary);
            font-size: 0.95rem;
        }
        .pd-template-field input:focus {
            outline: none;
            border-color: rgba(212,168,83,0.4);
        }
        .pd-template-actions {
            display: flex;
            gap: 0.75rem;
            justify-content: flex-end;
            margin-top: 1.5rem;
        }
        
        /* Live Preview Panel */
        .pd-preview-panel {
            width: 340px;
            border-left: 1px solid rgba(255,255,255,0.06);
            background: linear-gradient(180deg, #0a0a10 0%, #0c0c14 100%);
            display: flex;
            flex-direction: column;
            overflow: hidden;
            position: relative;
        }
        .pd-preview-panel::before {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            right: 0;
            height: 200px;
            background: radial-gradient(ellipse at top right, rgba(212,168,83,0.04) 0%, transparent 60%);
            pointer-events: none;
        }
        .pd-preview-header {
            padding: 0.9rem 1.25rem;
            border-bottom: 1px solid rgba(255,255,255,0.06);
            background: rgba(0,0,0,0.3);
            display: flex;
            align-items: center;
            justify-content: space-between;
        }
        .pd-preview-title {
            font-size: 0.6rem;
            color: var(--gold-primary);
            letter-spacing: 0.15em;
            text-transform: uppercase;
        }
        .pd-preview-badge {
            background: rgba(212,168,83,0.1);
            color: var(--gold-primary);
            font-size: 0.55rem;
            padding: 0.2rem 0.5rem;
            border-radius: 4px;
            letter-spacing: 0.08em;
        }
        .pd-preview-content {
            flex: 1;
            overflow-y: auto;
            padding: 1.75rem 1.5rem;
            font-family: 'Inter', sans-serif;
            position: relative;
            z-index: 1;
        }
        .pd-preview-section-num {
            font-size: 0.6rem;
            color: var(--gold-primary);
            letter-spacing: 0.18em;
            margin-bottom: 0.5rem;
            text-transform: uppercase;
        }
        .pd-preview-section-title {
            font-size: 1.4rem;
            font-weight: 400;
            margin-bottom: 0.9rem;
            line-height: 1.25;
        }
        .pd-preview-section-content {
            font-size: 0.95rem;
            line-height: 1.75;
            color: var(--text-secondary);
            margin-bottom: 1.25rem;
        }
        }
        .pd-preview-pricing-box {
            background: linear-gradient(135deg, rgba(212,168,83,0.12), rgba(212,168,83,0.04));
            border: 1px solid rgba(212,168,83,0.2);
            border-radius: 12px;
            padding: 1rem 1.1rem;
            margin-bottom: 1.25rem;
        }
        .pd-preview-amount {
            font-size: 1.7rem;
            color: var(--gold-primary);
            font-weight: 500;
        }
        .pd-preview-amount span {
            font-size: 0.85rem;
            color: var(--text-muted);
            font-weight: 400;
        }
        .pd-preview-terms {
            font-size: 0.75rem;
            color: var(--text-muted);
            margin-top: 0.6rem;
        }
        .pd-preview-highlights {
            list-style: none;
            padding: 0;
            margin-bottom: 1.25rem;
        }
        .pd-preview-highlights li {
            padding: 0.55rem 0;
            border-bottom: 1px solid rgba(255,255,255,0.04);
            display: flex;
            gap: 0.6rem;
            font-size: 0.9rem;
            align-items: flex-start;
        }
        .pd-preview-highlights li:last-child { border-bottom: none; }
        .pd-preview-highlights li span {
            color: var(--gold-primary);
            font-size: 0.85rem;
        }
        .pd-preview-prompt-btn {
            background: linear-gradient(135deg, rgba(212,168,83,0.08), rgba(212,168,83,0.03));
            border: 1px solid rgba(212,168,83,0.25);
            color: var(--gold-primary);
            padding: 0.6rem 1rem;
            border-radius: 20px;
            font-size: 0.8rem;
            cursor: default;
            font-family: inherit;
            display: inline-flex;
            align-items: center;
            gap: 0.4rem;
        }
        .pd-preview-prompt-btn::after {
            content: ‘\2192’;
            font-size: 0.9rem;
            opacity: 0.7;
        }
        .pd-preview-explanations {
            display: flex;
            flex-wrap: wrap;
            gap: 0.5rem;
            margin-top: 0.75rem;
        }
        .pd-preview-explanations .pd-preview-prompt-btn::after {
            content: none;
        }
        .pd-preview-mode {
            display: none;
            position: absolute;
            inset: 0;
            background: rgba(0,0,0,0.95);
            z-index: 100;
            flex-direction: column;
        }
        .pd-preview-mode.active {
            display: flex;
        }
        .pd-preview-mode-explain-buttons {
            display: flex;
            flex-wrap: wrap;
            gap: 0.5rem;
            margin-top: 1rem;
        }
        .pd-preview-mode-explain-btn.active {
            background: rgba(212,168,83,0.15);
            border-color: var(--gold-primary);
        }
        
        /* Signature Preview Styles */
        .pd-preview-signature-box {
            background: linear-gradient(135deg, rgba(139,92,246,0.08), rgba(139,92,246,0.02));
            border: 1px solid rgba(139,92,246,0.2);
            border-radius: 12px;
            padding: 1.25rem;
            margin-top: 1rem;
        }
        .pd-preview-signature-agreement {
            font-size: 0.8rem;
            color: var(--text-secondary);
            line-height: 1.6;
            margin-bottom: 1rem;
            font-style: italic;
        }
        .pd-preview-signature-fields {
            display: flex;
            gap: 1rem;
            margin-bottom: 0.75rem;
        }
        .pd-preview-signature-line {
            flex: 1;
            border-bottom: 1px dashed rgba(139,92,246,0.4);
            padding-bottom: 0.5rem;
            margin-bottom: 0.5rem;
        }
        .pd-preview-signature-line.small {
            flex: 0.5;
        }
        .pd-preview-sig-placeholder {
            font-size: 0.65rem;
            color: var(--text-muted);
            letter-spacing: 0.05em;
        }
        
        /* Signature Blocks */
        .pd-preview-sig-block {
            margin-bottom: 1rem;
            padding-bottom: 1rem;
            border-bottom: 1px solid rgba(255,255,255,0.05);
        }
        .pd-preview-sig-block:last-child {
            margin-bottom: 0;
            padding-bottom: 0;
            border-bottom: none;
        }
        .pd-preview-sig-block.luminary {
            background: rgba(212,168,83,0.05);
            padding: 0.75rem;
            border-radius: 8px;
            border-bottom: none;
        }
        .pd-preview-sig-label {
            font-size: 0.55rem;
            color: var(--text-muted);
            letter-spacing: 0.1em;
            margin-bottom: 0.5rem;
        }
        .pd-preview-sig-block.luminary .pd-preview-sig-label {
            color: var(--gold-primary);
        }
        .pd-preview-sig-filled {
            font-family: 'Inter', sans-serif;
            font-size: 1.1rem;
            font-style: italic;
            color: var(--gold-primary);
            border-bottom: 1px solid rgba(212,168,83,0.3);
            padding-bottom: 0.25rem;
            margin-bottom: 0.5rem;
        }
        .pd-preview-sig-info {
            display: flex;
            gap: 1rem;
            font-size: 0.7rem;
            color: var(--text-muted);
        }
        
        /* Preview Mode Signature */
        .pd-preview-mode-signature {
            background: linear-gradient(135deg, rgba(139,92,246,0.1), rgba(139,92,246,0.02));
            border: 1px solid rgba(139,92,246,0.25);
            border-radius: 16px;
            padding: 2rem;
            margin-top: 2rem;
        }
        .pd-preview-mode-sig-agreement {
            font-size: 1rem;
            color: var(--text-secondary);
            line-height: 1.7;
            margin-bottom: 2rem;
            font-style: italic;
        }
        .pd-preview-mode-sig-box {
            display: flex;
            gap: 2rem;
            margin-bottom: 1.5rem;
        }
        .pd-preview-mode-sig-field {
            flex: 1;
            padding-bottom: 0.5rem;
        }
        .pd-preview-mode-sig-field.main {
            flex: 2;
        }
        .pd-preview-mode-sig-field.date {
            flex: 1;
        }
        .pd-preview-mode-sig-field.full {
            margin-bottom: 1rem;
        }
        .pd-preview-mode-sig-line {
            height: 2px;
            background: linear-gradient(90deg, transparent, rgba(139,92,246,0.5), transparent);
            margin-bottom: 0.5rem;
        }
        .pd-preview-mode-sig-label {
            font-size: 0.75rem;
            color: var(--text-muted);
            letter-spacing: 0.08em;
        }
        
        /* Preview Mode Signature Parties */
        .pd-preview-mode-sig-luminary {
            background: rgba(212,168,83,0.08);
            border: 1px solid rgba(212,168,83,0.2);
            border-radius: 12px;
            padding: 1.25rem;
            margin-bottom: 1.5rem;
        }
        .pd-preview-mode-sig-org {
            background: rgba(139,92,246,0.05);
            border: 1px solid rgba(139,92,246,0.15);
            border-radius: 12px;
            padding: 1.5rem;
        }
        .pd-preview-mode-sig-party {
            font-size: 0.65rem;
            letter-spacing: 0.15em;
            color: var(--text-muted);
            margin-bottom: 0.75rem;
        }
        .pd-preview-mode-sig-luminary .pd-preview-mode-sig-party {
            color: var(--gold-primary);
        }
        .pd-preview-mode-sig-org .pd-preview-mode-sig-party {
            color: #a78bfa;
        }
        .pd-preview-mode-sig-signed {
            font-family: 'Inter', sans-serif;
            font-size: 1.5rem;
            font-style: italic;
            color: var(--gold-primary);
            border-bottom: 2px solid rgba(212,168,83,0.3);
            padding-bottom: 0.35rem;
            margin-bottom: 0.5rem;
            display: inline-block;
        }
        .pd-preview-mode-sig-details {
            font-size: 0.85rem;
            color: var(--text-secondary);
        }
        
        /* Preview Mode Overlay */
        .pd-preview-mode {
            position: fixed;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background: linear-gradient(135deg, var(--bg-deep), #12121a);
            z-index: 10001;
            display: none;
            flex-direction: column;
            font-family: 'Inter', sans-serif;
        }
        .pd-preview-mode.active { display: flex; }
        
        .pd-preview-mode-bar {
            background: rgba(168,85,247,0.1);
            border-bottom: 1px solid rgba(168,85,247,0.3);
            padding: 0.5rem 1.5rem;
            display: flex;
            justify-content: space-between;
            align-items: center;
        }
        .pd-preview-mode-bar span {
            color: #a855f7;
            font-size: 0.85rem;
        }
        .pd-preview-mode-nav {
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 0.75rem 1.5rem;
            border-bottom: 1px solid var(--border-subtle);
            background: rgba(0,0,0,0.4);
        }
        .pd-preview-mode-dots {
            display: flex;
            gap: 0.4rem;
        }
        .pd-preview-dot {
            height: 8px;
            border-radius: 4px;
            border: none;
            cursor: pointer;
            transition: all 0.2s ease;
        }
        .pd-preview-mode-main {
            flex: 1;
            display: flex;
            overflow: hidden;
        }
        .pd-preview-mode-content {
            flex: 1;
            padding: 2.5rem 3rem;
            display: flex;
            flex-direction: column;
            justify-content: center;
            overflow-y: auto;
            transition: flex 0.3s ease;
        }
        .pd-preview-mode-content.with-side { flex: 0 0 55%; }
        .pd-preview-mode-label {
            font-size: 0.7rem;
            color: var(--gold-primary);
            letter-spacing: 0.15em;
            margin-bottom: 0.5rem;
        }
        .pd-preview-mode-title {
            font-size: 2rem;
            font-weight: 400;
            margin-bottom: 1.25rem;
        }
        .pd-preview-mode-text {
            font-size: 1.15rem;
            line-height: 1.8;
            color: var(--text-secondary);
            margin-bottom: 1.5rem;
            max-width: 600px;
        }
        .pd-preview-mode-pricing {
            background: linear-gradient(135deg, rgba(212,168,83,0.15), rgba(212,168,83,0.05));
            border: 1px solid rgba(212,168,83,0.3);
            border-radius: 12px;
            padding: 1.25rem;
            margin-bottom: 1.5rem;
            max-width: 400px;
        }
        .pd-preview-mode-amount {
            font-size: 2.25rem;
            color: var(--gold-primary);
        }
        .pd-preview-mode-amount span { font-size: 1rem; color: var(--text-muted); }
        .pd-preview-mode-terms-row {
            display: flex;
            gap: 1.5rem;
            margin-top: 0.75rem;
            font-size: 0.9rem;
        }
        .pd-preview-mode-terms-row > div > div:first-child {
            font-size: 0.65rem;
            color: var(--text-muted);
            letter-spacing: 0.1em;
        }
        .pd-preview-mode-highlights {
            list-style: none;
            padding: 0;
            margin-bottom: 1.5rem;
        }
        .pd-preview-mode-highlights li {
            padding: 0.6rem 0;
            border-bottom: 1px solid rgba(255,255,255,0.08);
            display: flex;
            gap: 0.75rem;
            font-size: 1rem;
        }
        .pd-preview-mode-highlights li span { color: var(--gold-primary); }
        .pd-preview-mode-explain-btn {
            background: transparent;
            border: 1px solid rgba(212,168,83,0.5);
            color: var(--gold-primary);
            padding: 0.6rem 1.25rem;
            border-radius: 20px;
            font-size: 0.95rem;
            cursor: pointer;
            display: flex;
            align-items: center;
            gap: 0.5rem;
            font-family: inherit;
            transition: all 0.15s ease;
        }
        .pd-preview-mode-explain-btn:hover { background: rgba(212,168,83,0.1); }
        
        .pd-preview-mode-side {
            flex: 0 0 45%;
            background: linear-gradient(135deg, rgba(212,168,83,0.08), rgba(0,0,0,0.4));
            border-left: 1px solid rgba(212,168,83,0.2);
            padding: 2.5rem;
            overflow-y: auto;
            display: none;
        }
        .pd-preview-mode-side.active { display: block; }
        .pd-preview-mode-side-close {
            float: right;
            background: transparent;
            border: none;
            color: var(--text-muted);
            font-size: 1.5rem;
            cursor: pointer;
        }
        .pd-preview-mode-side-label {
            font-size: 0.65rem;
            color: var(--gold-primary);
            letter-spacing: 0.15em;
            margin-bottom: 0.75rem;
        }
        .pd-preview-mode-side-title {
            font-size: 1.25rem;
            margin-bottom: 1rem;
        }
        .pd-preview-mode-side-content {
            font-size: 1rem;
            line-height: 1.8;
            color: var(--text-secondary);
            white-space: pre-line;
        }
        
        .pd-preview-mode-footer {
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 0.75rem 1.5rem;
            border-top: 1px solid var(--border-subtle);
            background: rgba(0,0,0,0.4);
        }
        .pd-preview-nav-btn {
            background: transparent;
            border: 1px solid var(--border-subtle);
            color: var(--text-primary);
            padding: 0.6rem 1.25rem;
            border-radius: 20px;
            font-size: 0.9rem;
            cursor: pointer;
            font-family: inherit;
        }
        .pd-preview-nav-btn:disabled { color: var(--text-muted); cursor: not-allowed; }
        .pd-preview-nav-btn.next {
            background: linear-gradient(135deg, var(--gold-primary), var(--gold-dark));
            border: none;
            color: var(--bg-deep);
            font-weight: 600;
        }
        .pd-preview-nav-btn.next:disabled { background: var(--bg-elevated); color: var(--text-muted); }

        /* Proposal Completion View */
        .pd-completion-view {
            display: flex;
            flex-direction: column;
            gap: 2rem;
            max-width: 720px;
            width: 100%;
            margin: 0 auto;
        }
        .pd-completion-header {
            text-align: center;
            padding-bottom: 1.5rem;
            border-bottom: 1px solid var(--border-subtle);
        }
        .pd-completion-header h2 {
            font-size: 1.8rem;
            font-weight: 400;
            margin-bottom: 0.5rem;
            font-family: 'Inter', sans-serif;
        }
        .pd-completion-header p {
            color: var(--text-muted);
            font-size: 0.95rem;
        }
        .pd-completion-toc {
            background: rgba(255,255,255,0.03);
            border: 1px solid var(--border-subtle);
            border-radius: 12px;
            overflow: hidden;
        }
        .pd-completion-toc-title {
            font-size: 0.7rem;
            letter-spacing: 0.15em;
            color: var(--gold-primary);
            padding: 0.75rem 1.25rem;
            border-bottom: 1px solid var(--border-subtle);
            background: rgba(0,0,0,0.2);
        }
        .pd-completion-toc-item {
            display: flex;
            align-items: center;
            gap: 0.75rem;
            padding: 0.65rem 1.25rem;
            cursor: pointer;
            transition: background 0.15s;
            border-bottom: 1px solid rgba(255,255,255,0.03);
            color: var(--text-secondary);
            font-size: 0.95rem;
        }
        .pd-completion-toc-item:last-child { border-bottom: none; }
        .pd-completion-toc-item:hover { background: rgba(212,168,83,0.08); color: var(--text-primary); }
        .pd-completion-toc-num {
            width: 24px;
            height: 24px;
            border-radius: 50%;
            background: rgba(212,168,83,0.15);
            color: var(--gold-primary);
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 0.7rem;
            flex-shrink: 0;
        }
        .pd-completion-toc-type {
            font-size: 0.7rem;
            color: var(--text-muted);
            margin-left: auto;
            text-transform: uppercase;
            letter-spacing: 0.08em;
        }
        .pd-completion-actions {
            display: flex;
            gap: 0.75rem;
            justify-content: center;
            flex-wrap: wrap;
        }
        .pd-completion-btn {
            display: flex;
            align-items: center;
            gap: 0.5rem;
            padding: 0.75rem 1.5rem;
            border-radius: 10px;
            font-size: 0.9rem;
            cursor: pointer;
            font-family: inherit;
            transition: all 0.2s;
            border: 1px solid var(--border-subtle);
            background: rgba(255,255,255,0.04);
            color: var(--text-primary);
        }
        .pd-completion-btn:hover { background: rgba(255,255,255,0.08); }
        .pd-completion-btn.primary {
            background: linear-gradient(135deg, rgba(212,168,83,0.2), rgba(212,168,83,0.08));
            border-color: rgba(212,168,83,0.3);
            color: var(--gold-primary);
        }
        .pd-completion-btn.primary:hover { background: linear-gradient(135deg, rgba(212,168,83,0.3), rgba(212,168,83,0.15)); }
        .pd-completion-question {
            background: rgba(255,255,255,0.03);
            border: 1px solid var(--border-subtle);
            border-radius: 12px;
            padding: 1.25rem;
        }
        .pd-completion-question-title {
            font-size: 0.7rem;
            letter-spacing: 0.15em;
            color: var(--gold-primary);
            margin-bottom: 0.75rem;
        }
        .pd-completion-question textarea {
            width: 100%;
            min-height: 100px;
            background: rgba(0,0,0,0.3);
            border: 1px solid var(--border-subtle);
            border-radius: 8px;
            color: var(--text-primary);
            padding: 0.75rem;
            font-family: inherit;
            font-size: 0.9rem;
            resize: vertical;
            margin-bottom: 0.75rem;
        }
        .pd-completion-question textarea:focus { outline: none; border-color: rgba(212,168,83,0.4); }
        .pd-completion-question-sent {
            color: var(--gold-primary);
            font-size: 0.85rem;
            display: flex;
            align-items: center;
            gap: 0.4rem;
        }
        .pd-completion-transparency {
            background: rgba(255,255,255,0.03);
            border: 1px solid var(--border-subtle);
            border-radius: 12px;
            overflow: hidden;
        }
        .pd-completion-transparency-item {
            display: flex;
            align-items: center;
            gap: 0.6rem;
            padding: 0.6rem 1.25rem;
            cursor: pointer;
            transition: background 0.15s;
            border-bottom: 1px solid rgba(255,255,255,0.03);
            color: var(--text-secondary);
            font-size: 0.9rem;
        }
        .pd-completion-transparency-item:last-child { border-bottom: none; }
        .pd-completion-transparency-item:hover { background: rgba(168,85,247,0.08); color: var(--text-primary); }
        .pd-completion-transparency-item .section-ref {
            font-size: 0.7rem;
            color: var(--text-muted);
            margin-left: auto;
            white-space: nowrap;
        }
        .pd-completion-transparency-item svg { flex-shrink: 0; color: #a855f7; }
        .pd-completion-input-row {
            display: flex;
            gap: 0.5rem;
            align-items: center;
            flex-wrap: wrap;
        }
        .pd-completion-icon-btn {
            width: 38px;
            height: 38px;
            border-radius: 8px;
            border: 1px solid var(--border-subtle);
            background: rgba(255,255,255,0.04);
            color: var(--text-secondary);
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            transition: all 0.2s;
            flex-shrink: 0;
        }
        .pd-completion-icon-btn:hover { background: rgba(255,255,255,0.08); color: var(--text-primary); }
        .pd-completion-icon-btn.recording,
        .pd-completion-btn.recording {
            background: rgba(239,68,68,0.15) !important;
            border-color: rgba(239,68,68,0.4) !important;
            color: #ef4444 !important;
            animation: pdPulseRec 1.5s ease-in-out infinite;
        }
        @keyframes pdPulseRec {
            0%, 100% { box-shadow: 0 0 0 0 rgba(239,68,68,0.3); }
            50% { box-shadow: 0 0 0 6px rgba(239,68,68,0); }
        }
        .pd-completion-organize-bar {
            display: flex;
            gap: 0.5rem;
            align-items: center;
            padding: 0.5rem 0;
        }
        .pd-completion-organize-bar span {
            font-size: 0.8rem;
            color: var(--text-muted);
        }

        /* Proposal Acceptance Section */
        .pd-completion-accept {
            background: rgba(34,197,94,0.04);
            border: 1px solid rgba(34,197,94,0.15);
            border-radius: 12px;
            padding: 1.5rem;
            margin-top: 1.5rem;
        }
        .pd-completion-accept .pd-completion-toc-title {
            color: #22c55e;
        }
        .pd-completion-accept-pricing {
            text-align: center;
            padding: 1rem 0;
            margin-bottom: 1rem;
        }
        .pd-accept-amount {
            font-size: 2rem;
            font-weight: 700;
            color: var(--gold-primary);
        }
        .pd-accept-amount span {
            font-size: 1rem;
            font-weight: 400;
            opacity: 0.7;
        }
        .pd-accept-terms {
            font-size: 0.85rem;
            color: var(--text-muted);
            margin-top: 0.25rem;
        }
        .pd-accept-field {
            margin-bottom: 0.75rem;
        }
        .pd-accept-field label {
            display: block;
            font-size: 0.75rem;
            color: var(--text-muted);
            text-transform: uppercase;
            letter-spacing: 0.05em;
            margin-bottom: 0.3rem;
        }
        .pd-accept-field input {
            width: 100%;
            padding: 0.6rem 0.75rem;
            background: rgba(255,255,255,0.04);
            border: 1px solid rgba(255,255,255,0.1);
            border-radius: 8px;
            color: var(--text-primary);
            font-size: 0.9rem;
            box-sizing: border-box;
        }
        .pd-accept-field input:focus {
            outline: none;
            border-color: rgba(34,197,94,0.4);
            box-shadow: 0 0 0 3px rgba(34,197,94,0.1);
        }
        .pd-accept-btn {
            width: 100%;
            padding: 0.75rem;
            background: linear-gradient(135deg, #22c55e, #16a34a);
            border: none;
            border-radius: 8px;
            color: #fff;
            font-size: 0.95rem;
            font-weight: 600;
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 0.5rem;
            margin-top: 1rem;
            transition: all 0.2s;
        }
        .pd-accept-btn:hover { transform: translateY(-1px); box-shadow: 0 4px 12px rgba(34,197,94,0.3); }
        .pd-accept-btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }
        .pd-accept-note {
            font-size: 0.75rem;
            color: var(--text-muted);
            text-align: center;
            margin-top: 0.75rem;
        }
        .pd-accept-success {
            text-align: center;
            padding: 1.5rem 0;
        }
        .pd-accept-success-icon {
            font-size: 2.5rem;
            margin-bottom: 0.75rem;
        }
        .pd-accept-success h3 {
            color: #22c55e;
            font-size: 1.1rem;
            margin-bottom: 0.5rem;
        }
        .pd-accept-success p {
            color: var(--text-secondary);
            font-size: 0.85rem;
            line-height: 1.5;
        }
        .pd-accept-success .ref-code {
            display: inline-block;
            background: rgba(212,168,83,0.1);
            border: 1px solid rgba(212,168,83,0.2);
            border-radius: 6px;
            padding: 0.25rem 0.6rem;
            font-family: monospace;
            font-size: 0.85rem;
            color: var(--gold-primary);
            margin-top: 0.5rem;
        }

        /* Dynamic Layout Blocks */
        .pd-layout-blocks { display: flex; flex-direction: column; gap: 1.2rem; }
        .pd-layout-block-lead {
            font-size: 1.25rem;
            line-height: 1.5;
            color: var(--text-primary);
            font-weight: 500;
            border-left: 3px solid var(--gold-primary);
            padding-left: 1rem;
        }
        .pd-layout-block-body {
            font-size: 1rem;
            line-height: 1.7;
            color: var(--text-secondary);
        }
        .pd-layout-block-quote {
            font-size: 1.1rem;
            font-style: italic;
            color: var(--gold-primary);
            padding: 1rem 1.5rem;
            background: rgba(212,168,83,0.06);
            border-radius: 8px;
            border-left: 3px solid var(--gold-primary);
        }
        .pd-layout-block-stats {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
            gap: 1rem;
            padding: 1rem 0;
        }
        .pd-layout-stat-card {
            text-align: center;
            padding: 1rem;
            background: rgba(212,168,83,0.06);
            border-radius: 10px;
            border: 1px solid rgba(212,168,83,0.15);
        }
        .pd-layout-stat-value {
            font-size: 1.5rem;
            font-weight: 700;
            color: var(--gold-primary);
        }
        .pd-layout-stat-label {
            font-size: 0.75rem;
            color: var(--text-muted);
            text-transform: uppercase;
            letter-spacing: 0.05em;
            margin-top: 0.25rem;
        }
        .pd-layout-block-columns {
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 1.5rem;
        }
        .pd-layout-column {
            font-size: 1rem;
            line-height: 1.7;
            color: var(--text-secondary);
        }
        .pd-layout-block-callout {
            background: linear-gradient(135deg, rgba(212,168,83,0.08), rgba(212,168,83,0.02));
            border: 1px solid rgba(212,168,83,0.2);
            border-radius: 12px;
            padding: 1.25rem 1.5rem;
            font-size: 1.05rem;
            color: var(--text-primary);
            line-height: 1.6;
        }
        .pd-layout-grid-cards {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
            gap: 1rem;
        }
        .pd-layout-grid-card {
            background: rgba(255,255,255,0.03);
            border: 1px solid rgba(255,255,255,0.08);
            border-radius: 10px;
            padding: 1.25rem;
            transition: border-color 0.2s;
        }
        .pd-layout-grid-card:hover { border-color: rgba(212,168,83,0.3); }
        .pd-layout-grid-card-heading {
            font-weight: 600;
            color: var(--text-primary);
            margin-bottom: 0.5rem;
            font-size: 0.95rem;
        }
        .pd-layout-grid-card-text {
            font-size: 0.85rem;
            color: var(--text-secondary);
            line-height: 1.5;
        }
        .pd-layout-timeline-steps { display: flex; flex-direction: column; gap: 0; position: relative; }
        .pd-layout-timeline-step {
            display: flex;
            gap: 1rem;
            position: relative;
            padding-bottom: 1.5rem;
        }
        .pd-layout-timeline-step:last-child { padding-bottom: 0; }
        .pd-layout-timeline-marker {
            width: 32px;
            height: 32px;
            border-radius: 50%;
            background: rgba(212,168,83,0.15);
            border: 2px solid var(--gold-primary);
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 0.75rem;
            font-weight: 700;
            color: var(--gold-primary);
            flex-shrink: 0;
            position: relative;
            z-index: 1;
        }
        .pd-layout-timeline-step:not(:last-child) .pd-layout-timeline-marker::after {
            content: '';
            position: absolute;
            top: 100%;
            left: 50%;
            transform: translateX(-50%);
            width: 2px;
            height: calc(100% + 1rem);
            background: rgba(212,168,83,0.2);
        }
        .pd-layout-timeline-body { flex: 1; padding-top: 0.25rem; }
        .pd-layout-timeline-title {
            font-weight: 600;
            color: var(--text-primary);
            font-size: 0.95rem;
        }
        .pd-layout-timeline-desc {
            font-size: 0.85rem;
            color: var(--text-secondary);
            line-height: 1.5;
            margin-top: 0.25rem;
        }
        .pd-layout-timeline-phase {
            font-size: 0.7rem;
            text-transform: uppercase;
            letter-spacing: 0.06em;
            color: var(--gold-primary);
            margin-bottom: 0.15rem;
        }
        .pd-layout-numbered-list { display: flex; flex-direction: column; gap: 0.75rem; }
        .pd-layout-numbered-item {
            display: flex;
            gap: 0.75rem;
            align-items: flex-start;
        }
        .pd-layout-numbered-num {
            width: 26px;
            height: 26px;
            border-radius: 50%;
            background: var(--gold-primary);
            color: #000;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 0.75rem;
            font-weight: 700;
            flex-shrink: 0;
        }
        .pd-layout-numbered-text {
            font-size: 0.95rem;
            color: var(--text-secondary);
            line-height: 1.5;
            padding-top: 0.15rem;
        }
        .pd-layout-format-btn {
            display: inline-flex;
            align-items: center;
            gap: 0.4rem;
            padding: 0.35rem 0.75rem;
            font-size: 0.75rem;
            background: rgba(139,92,246,0.12);
            border: 1px solid rgba(139,92,246,0.25);
            border-radius: 6px;
            color: #a78bfa;
            cursor: pointer;
            transition: all 0.2s;
        }
        .pd-layout-format-btn:hover { background: rgba(139,92,246,0.2); border-color: rgba(139,92,246,0.4); }
        .pd-layout-format-btn.loading { opacity: 0.6; pointer-events: none; }

        /* Integrated Research Panel in Proposal Designer */
        .pd-research-toggle {
            position: absolute;
            top: 50%;
            right: 340px;
            transform: translateY(-50%);
            background: rgba(59,130,246,0.15);
            border: 1px solid rgba(59,130,246,0.3);
            color: #60a5fa;
            padding: 0.5rem;
            border-radius: 8px 0 0 8px;
            cursor: pointer;
            z-index: 5;
            transition: all 0.2s ease;
            display: flex;
            align-items: center;
            gap: 0.4rem;
            font-size: 0.7rem;
            letter-spacing: 0.05em;
            writing-mode: vertical-rl;
            text-orientation: mixed;
        }
        .pd-research-toggle:hover { background: rgba(59,130,246,0.25); }
        .pd-research-toggle.has-data { background: rgba(34,197,94,0.15); border-color: rgba(34,197,94,0.3); color: #4ade80; }
        
        .pd-research-panel {
            width: 340px;
            min-width: 340px;
            background: linear-gradient(180deg, #0c0c14 0%, #0a0a10 100%);
            border-left: 1px solid rgba(59,130,246,0.2);
            transition: all 0.3s ease;
            z-index: 4;
            display: flex;
            flex-direction: column;
            overflow: hidden;
        }
        .pd-research-panel.collapsed {
            width: 48px;
            min-width: 48px;
        }
        .pd-research-panel.collapsed .pd-research-header,
        .pd-research-panel.collapsed .pd-research-actions,
        .pd-research-panel.collapsed .pd-research-cats,
        .pd-research-panel.collapsed .pd-research-add-topic,
        .pd-research-panel.collapsed .pd-research-detail {
            display: none;
        }
        .pd-research-collapsed-bar {
            display: none;
            flex-direction: column;
            align-items: center;
            padding: 1rem 0;
            gap: 1rem;
            height: 100%;
        }
        .pd-research-panel.collapsed .pd-research-collapsed-bar {
            display: flex;
        }
        .pd-research-collapsed-icon {
            font-size: 1.2rem;
            cursor: pointer;
            padding: 0.5rem;
            border-radius: 8px;
            transition: all 0.2s ease;
        }
        .pd-research-collapsed-icon:hover {
            background: rgba(59,130,246,0.15);
        }
        .pd-research-collapsed-label {
            writing-mode: vertical-rl;
            text-orientation: mixed;
            font-size: 0.65rem;
            letter-spacing: 0.1em;
            text-transform: uppercase;
            color: #60a5fa;
            cursor: pointer;
        }
        .pd-research-toggle-btn {
            position: absolute;
            top: 0.75rem;
            right: 0.75rem;
            background: rgba(59,130,246,0.1);
            border: 1px solid rgba(59,130,246,0.2);
            color: #60a5fa;
            cursor: pointer;
            padding: 0.35rem 0.5rem;
            border-radius: 6px;
            font-size: 0.7rem;
            display: flex;
            align-items: center;
            gap: 0.3rem;
            transition: all 0.2s ease;
        }
        .pd-research-toggle-btn:hover {
            background: rgba(59,130,246,0.2);
        }
        .pd-research-toggle { display: none; }
        
        /* Draft Items */
        .pd-draft-item:hover {
            background: rgba(34,197,94,0.08) !important;
            border-color: rgba(34,197,94,0.2) !important;
        }
        .pd-draft-item:hover button {
            color: #f87171;
        }
        
        .pd-research-header {
            padding: 1rem 1.25rem;
            border-bottom: 1px solid rgba(255,255,255,0.06);
            background: rgba(59,130,246,0.05);
            display: flex;
            justify-content: space-between;
            align-items: center;
        }
        .pd-research-header-title {
            font-size: 0.65rem;
            color: #60a5fa;
            letter-spacing: 0.12em;
            text-transform: uppercase;
            display: flex;
            align-items: center;
            gap: 0.5rem;
        }
        .pd-research-header-title::before {
            content: '\1F52C';
            font-size: 0.9rem;
        }
        .pd-research-status {
            font-size: 0.65rem;
            padding: 0.25rem 0.6rem;
            border-radius: 10px;
        }
        .pd-research-status.complete {
            background: rgba(34,197,94,0.15);
            color: #4ade80;
        }
        .pd-research-status.partial {
            background: rgba(234,179,8,0.15);
            color: #fbbf24;
        }
        .pd-research-status.none {
            background: rgba(239,68,68,0.15);
            color: #f87171;
        }
        .pd-research-close {
            background: transparent;
            border: none;
            color: var(--text-muted);
            cursor: pointer;
            padding: 0.25rem;
            font-size: 1.2rem;
        }
        
        .pd-research-actions {
            padding: 0.75rem 1.25rem;
            border-bottom: 1px solid rgba(255,255,255,0.06);
            display: flex;
            gap: 0.5rem;
        }
        .pd-research-action-btn {
            flex: 1;
            padding: 0.5rem 0.75rem;
            border-radius: 6px;
            font-size: 0.72rem;
            cursor: pointer;
            font-family: inherit;
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 0.4rem;
            transition: all 0.2s ease;
        }
        .pd-research-action-btn.primary {
            background: rgba(59,130,246,0.2);
            border: 1px solid rgba(59,130,246,0.4);
            color: #60a5fa;
        }
        .pd-research-action-btn.primary:hover { background: rgba(59,130,246,0.3); }
        .pd-research-action-btn.secondary {
            background: rgba(255,255,255,0.03);
            border: 1px solid rgba(255,255,255,0.1);
            color: var(--text-secondary);
        }
        .pd-research-action-btn.secondary:hover { border-color: rgba(255,255,255,0.2); }
        
        .pd-research-cats {
            flex: 1;
            overflow-y: auto;
            padding: 0.75rem;
        }
        .pd-research-cat {
            background: rgba(255,255,255,0.02);
            border: 1px solid rgba(255,255,255,0.04);
            border-radius: 8px;
            padding: 0.75rem;
            margin-bottom: 0.5rem;
            cursor: pointer;
            transition: all 0.15s ease;
        }
        .pd-research-cat:hover { background: rgba(255,255,255,0.04); }
        .pd-research-cat.active { 
            background: rgba(59,130,246,0.1); 
            border-color: rgba(59,130,246,0.3); 
        }
        .pd-research-cat-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 0.25rem;
        }
        .pd-research-cat-title {
            font-size: 0.8rem;
            font-weight: 500;
            display: flex;
            align-items: center;
            gap: 0.4rem;
        }
        .pd-research-cat-status {
            font-size: 0.6rem;
            padding: 0.15rem 0.4rem;
            border-radius: 4px;
        }
        .pd-research-cat-status.done {
            background: rgba(34,197,94,0.2);
            color: #4ade80;
        }
        .pd-research-cat-status.pending {
            background: rgba(255,255,255,0.1);
            color: var(--text-muted);
        }
        .pd-research-cat-preview {
            font-size: 0.75rem;
            color: var(--text-muted);
            line-height: 1.4;
            max-height: 2.8em;
            overflow: hidden;
            text-overflow: ellipsis;
        }
        
        .pd-research-detail {
            padding: 1rem 1.25rem;
            border-top: 1px solid rgba(255,255,255,0.06);
            background: rgba(0,0,0,0.2);
            max-height: 40%;
            overflow-y: auto;
        }
        .pd-research-detail-title {
            font-size: 0.7rem;
            color: #60a5fa;
            margin-bottom: 0.5rem;
            display: flex;
            align-items: center;
            gap: 0.4rem;
        }
        .pd-research-detail-content {
            font-size: 0.85rem;
            line-height: 1.6;
            color: var(--text-secondary);
        }
        .pd-research-use-btn {
            margin-top: 0.75rem;
            padding: 0.5rem 1rem;
            background: linear-gradient(135deg, var(--gold-primary), #c9a54a);
            border: none;
            color: #0a0a0f;
            font-size: 0.72rem;
            font-weight: 600;
            border-radius: 6px;
            cursor: pointer;
            font-family: inherit;
            display: flex;
            align-items: center;
            gap: 0.4rem;
        }
        .pd-research-use-btn:hover { box-shadow: 0 2px 10px rgba(212,168,83,0.3); }
        
        /* Editable Research Topics */
        .pd-research-add-topic {
            margin: 0.5rem 0.75rem;
            padding: 0.6rem;
            background: rgba(59,130,246,0.08);
            border: 1px dashed rgba(59,130,246,0.3);
            border-radius: 8px;
            color: #60a5fa;
            font-size: 0.8rem;
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 0.4rem;
            transition: all 0.2s ease;
        }
        .pd-research-add-topic:hover { background: rgba(59,130,246,0.15); border-style: solid; }
        
        .pd-research-cat-edit {
            display: flex;
            gap: 0.5rem;
            align-items: center;
        }
        .pd-research-cat-edit-input {
            flex: 1;
            background: rgba(0,0,0,0.3);
            border: 1px solid rgba(59,130,246,0.3);
            border-radius: 4px;
            padding: 0.4rem 0.6rem;
            color: var(--text-primary);
            font-size: 0.8rem;
            font-family: inherit;
        }
        .pd-research-cat-edit-input:focus { outline: none; border-color: #60a5fa; }
        .pd-research-cat-edit-btn {
            width: 28px;
            height: 28px;
            border-radius: 4px;
            border: none;
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 0.85rem;
            transition: all 0.15s ease;
        }
        .pd-research-cat-edit-btn.save {
            background: rgba(34,197,94,0.2);
            color: #4ade80;
        }
        .pd-research-cat-edit-btn.save:hover { background: rgba(34,197,94,0.3); }
        .pd-research-cat-edit-btn.cancel {
            background: rgba(255,255,255,0.05);
            color: var(--text-muted);
        }
        .pd-research-cat-edit-btn.cancel:hover { background: rgba(255,255,255,0.1); }
        .pd-research-cat-edit-btn.delete {
            background: rgba(239,68,68,0.1);
            color: #f87171;
        }
        .pd-research-cat-edit-btn.delete:hover { background: rgba(239,68,68,0.2); }
        
        .pd-research-cat-actions {
            display: flex;
            gap: 0.25rem;
            opacity: 0;
            transition: opacity 0.15s ease;
        }
        .pd-research-cat:hover .pd-research-cat-actions { opacity: 1; }
        .pd-research-cat-action-btn {
            width: 22px;
            height: 22px;
            border-radius: 4px;
            border: none;
            background: transparent;
            color: var(--text-muted);
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 0.75rem;
            transition: all 0.15s ease;
        }
        .pd-research-cat-action-btn:hover { background: rgba(255,255,255,0.1); color: var(--text-primary); }
        .pd-research-cat-action-btn.delete:hover { background: rgba(239,68,68,0.15); color: #f87171; }
        
        /* Bulk Research Queue */
        .bulk-research-modal {
            position: fixed;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background: rgba(0,0,0,0.85);
            z-index: 10002;
            display: none;
            align-items: center;
            justify-content: center;
        }
        .bulk-research-modal.active { display: flex; }
        .bulk-research-box {
            background: linear-gradient(135deg, #12121a, #0a0a0f);
            border: 1px solid rgba(59,130,246,0.3);
            border-radius: 16px;
            width: 90%;
            max-width: 800px;
            max-height: 85vh;
            display: flex;
            flex-direction: column;
            overflow: hidden;
        }
        .bulk-research-header {
            padding: 1.25rem 1.5rem;
            border-bottom: 1px solid rgba(255,255,255,0.06);
            display: flex;
            justify-content: space-between;
            align-items: center;
        }
        .bulk-research-title {
            font-family: 'Space Grotesk', sans-serif;
            font-size: 1.25rem;
            display: flex;
            align-items: center;
            gap: 0.75rem;
        }
        .bulk-research-title::before {
            content: '\1F52C';
            font-size: 1.5rem;
        }
        .bulk-research-close {
            background: transparent;
            border: none;
            color: var(--text-muted);
            cursor: pointer;
            font-size: 1.5rem;
        }
        .bulk-research-content {
            flex: 1;
            overflow-y: auto;
            padding: 1.5rem;
        }
        .bulk-research-section-title {
            font-size: 0.7rem;
            color: var(--gold-primary);
            letter-spacing: 0.12em;
            text-transform: uppercase;
            margin-bottom: 0.75rem;
        }
        .bulk-research-org-list {
            display: grid;
            grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
            gap: 0.5rem;
            margin-bottom: 1.5rem;
        }
        .bulk-research-org {
            display: flex;
            align-items: center;
            gap: 0.75rem;
            padding: 0.6rem 0.75rem;
            background: rgba(255,255,255,0.02);
            border: 1px solid rgba(255,255,255,0.06);
            border-radius: 8px;
            cursor: pointer;
            transition: all 0.15s ease;
        }
        .bulk-research-org:hover { background: rgba(255,255,255,0.04); }
        .bulk-research-org.selected {
            background: rgba(59,130,246,0.1);
            border-color: rgba(59,130,246,0.4);
        }
        .bulk-research-org-check {
            width: 18px;
            height: 18px;
            border: 2px solid rgba(255,255,255,0.2);
            border-radius: 4px;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 0.7rem;
            color: transparent;
        }
        .bulk-research-org.selected .bulk-research-org-check {
            background: #60a5fa;
            border-color: #60a5fa;
            color: white;
        }
        .bulk-research-org-name {
            font-size: 0.85rem;
            flex: 1;
        }
        .bulk-research-org-status {
            font-size: 0.65rem;
            padding: 0.15rem 0.4rem;
            border-radius: 4px;
        }
        .bulk-research-org-status.complete {
            background: rgba(34,197,94,0.15);
            color: #4ade80;
        }
        .bulk-research-org-status.partial {
            background: rgba(234,179,8,0.15);
            color: #fbbf24;
        }
        .bulk-research-org-status.none {
            background: rgba(255,255,255,0.1);
            color: var(--text-muted);
        }
        .bulk-research-progress {
            background: rgba(59,130,246,0.1);
            border: 1px solid rgba(59,130,246,0.2);
            border-radius: 12px;
            padding: 1.25rem;
            margin-bottom: 1rem;
        }
        .bulk-research-progress-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 0.75rem;
        }
        .bulk-research-progress-title {
            font-size: 0.85rem;
            color: #60a5fa;
        }
        .bulk-research-progress-count {
            font-size: 0.8rem;
            color: var(--text-secondary);
        }
        .bulk-research-progress-bar {
            height: 6px;
            background: rgba(255,255,255,0.1);
            border-radius: 3px;
            overflow: hidden;
        }
        .bulk-research-progress-fill {
            height: 100%;
            background: linear-gradient(90deg, #60a5fa, #3b82f6);
            border-radius: 3px;
            transition: width 0.3s ease;
        }
        .bulk-research-log {
            margin-top: 1rem;
            max-height: 150px;
            overflow-y: auto;
            font-size: 0.75rem;
            color: var(--text-muted);
            font-family: 'Space Grotesk', sans-serif;
        }
        .bulk-research-log-entry {
            padding: 0.25rem 0;
            border-bottom: 1px solid rgba(255,255,255,0.03);
        }
        .bulk-research-log-entry.success { color: #4ade80; }
        .bulk-research-log-entry.error { color: #f87171; }
        .bulk-research-footer {
            padding: 1rem 1.5rem;
            border-top: 1px solid rgba(255,255,255,0.06);
            display: flex;
            justify-content: space-between;
            align-items: center;
        }
        .bulk-research-selected-count {
            font-size: 0.85rem;
            color: var(--text-secondary);
        }
        .bulk-research-actions {
            display: flex;
            gap: 0.75rem;
        }
        
        /* ===== PRESS RELEASE MODAL ===== */
        
        /* Smart Drafting Controls */
        .pd-ai-controls {
            background: linear-gradient(135deg, rgba(139,92,246,0.08), rgba(139,92,246,0.03));
            border: 1px solid rgba(139,92,246,0.2);
            border-radius: 12px;
            padding: 1.25rem;
            margin-top: 1.5rem;
        }
        .pd-ai-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 1rem;
        }
        .pd-ai-title {
            font-size: 0.65rem;
            color: #a78bfa;
            letter-spacing: 0.12em;
            text-transform: uppercase;
            display: flex;
            align-items: center;
            gap: 0.5rem;
        }
        .pd-ai-title::before {
            content: '\270E';
            font-size: 0.9rem;
        }
        .pd-ai-status {
            font-size: 0.65rem;
            padding: 0.2rem 0.5rem;
            border-radius: 8px;
            background: rgba(139,92,246,0.15);
            color: #a78bfa;
        }
        .pd-ai-buttons {
            display: flex;
            gap: 0.75rem;
            flex-wrap: wrap;
        }
        .pd-ai-btn {
            flex: 1;
            min-width: 140px;
            padding: 0.7rem 1rem;
            border-radius: 8px;
            font-size: 0.8rem;
            cursor: pointer;
            font-family: inherit;
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 0.5rem;
            transition: all 0.2s ease;
        }
        .pd-ai-btn.draft {
            background: linear-gradient(135deg, rgba(139,92,246,0.2), rgba(139,92,246,0.1));
            border: 1px solid rgba(139,92,246,0.4);
            color: #c4b5fd;
        }
        .pd-ai-btn.draft:hover { background: rgba(139,92,246,0.3); }
        .pd-ai-btn.pricing {
            background: linear-gradient(135deg, rgba(34,197,94,0.2), rgba(34,197,94,0.1));
            border: 1px solid rgba(34,197,94,0.4);
            color: #86efac;
        }
        .pd-ai-btn.pricing:hover { background: rgba(34,197,94,0.3); }
        .pd-ai-btn:disabled {
            opacity: 0.5;
            cursor: not-allowed;
        }
        .pd-ai-btn.loading {
            pointer-events: none;
        }
        .pd-ai-btn.loading::after {
            content: '';
            width: 14px;
            height: 14px;
            border: 2px solid currentColor;
            border-top-color: transparent;
            border-radius: 50%;
            animation: spin 0.8s linear infinite;
        }
        @keyframes spin { to { transform: rotate(360deg); } }
        .pd-ai-btn.creative {
            background: rgba(212,168,83,0.12);
            border-color: rgba(212,168,83,0.3);
            color: #D4A853;
        }
        .pd-ai-btn.creative:hover {
            background: rgba(212,168,83,0.25);
            border-color: rgba(212,168,83,0.5);
            box-shadow: 0 0 12px rgba(212,168,83,0.2);
        }
        .pd-ai-spinner {
            display: inline-block;
            width: 14px;
            height: 14px;
            border: 2px solid currentColor;
            border-top-color: transparent;
            border-radius: 50%;
            animation: spin 0.8s linear infinite;
            vertical-align: middle;
            margin-right: 4px;
        }

        /* ── Forge From Raw Panel ── */
        .pd-forge-panel {
            border-bottom: 1px solid var(--border-subtle);
        }
        .pd-forge-toggle {
            display: flex;
            align-items: center;
            gap: 0.4rem;
            width: 100%;
            padding: 0.5rem 0.75rem;
            background: linear-gradient(135deg, rgba(212,168,83,0.08), rgba(168,85,247,0.05));
            border: none;
            color: #D4A853;
            font-size: 0.7rem;
            font-weight: 600;
            cursor: pointer;
            letter-spacing: 0.03em;
            transition: background 0.2s;
        }
        .pd-forge-toggle:hover {
            background: linear-gradient(135deg, rgba(212,168,83,0.15), rgba(168,85,247,0.1));
        }
        .pd-forge-content {
            padding: 0.5rem;
            background: rgba(0,0,0,0.15);
        }
        .pd-forge-textarea {
            width: 100%;
            min-height: 100px;
            max-height: 250px;
            padding: 0.5rem;
            background: rgba(255,255,255,0.04);
            border: 1px solid rgba(212,168,83,0.2);
            border-radius: 6px;
            color: var(--text-primary);
            font-size: 0.75rem;
            line-height: 1.5;
            resize: vertical;
            font-family: inherit;
        }
        .pd-forge-textarea:focus {
            outline: none;
            border-color: rgba(212,168,83,0.4);
            box-shadow: 0 0 8px rgba(212,168,83,0.1);
        }
        .pd-forge-guidance {
            width: 100%;
            padding: 0.4rem 0.5rem;
            margin-top: 0.4rem;
            background: rgba(255,255,255,0.04);
            border: 1px solid var(--border-subtle);
            border-radius: 6px;
            color: var(--text-primary);
            font-size: 0.7rem;
        }
        .pd-forge-generate-btn {
            width: 100%;
            margin-top: 0.4rem;
            justify-content: center;
            background: rgba(212,168,83,0.12) !important;
            border-color: rgba(212,168,83,0.3) !important;
            color: #D4A853 !important;
            font-weight: 600;
        }
        .pd-forge-generate-btn:hover {
            background: rgba(212,168,83,0.2) !important;
        }

        /* ── Story Arc Badges ── */
        .pd-arc-badge {
            font-size: 0.5rem;
            padding: 0.1rem 0.3rem;
            border-radius: 3px;
            font-weight: 600;
            letter-spacing: 0.04em;
            text-transform: uppercase;
        }
        .pd-arc-badge.opening { background: rgba(6,182,212,0.15); color: #22d3ee; }
        .pd-arc-badge.build { background: rgba(139,92,246,0.15); color: #a78bfa; }
        .pd-arc-badge.value { background: rgba(212,168,83,0.15); color: #D4A853; }
        .pd-arc-badge.investment { background: rgba(34,197,94,0.15); color: #4ade80; }
        .pd-arc-badge.close { background: rgba(251,146,60,0.15); color: #fb923c; }

        /* ── Floating Forge Agent Panel ── */
        .pd-forge-agent {
            position: absolute;
            bottom: 20px;
            right: 20px;
            width: 380px;
            height: 480px;
            background: linear-gradient(145deg, rgba(20,20,30,0.97), rgba(12,12,18,0.98));
            border: 1px solid rgba(212,168,83,0.25);
            border-radius: 16px;
            box-shadow: 0 12px 48px rgba(0,0,0,0.6), 0 0 24px rgba(212,168,83,0.08);
            backdrop-filter: blur(20px);
            -webkit-backdrop-filter: blur(20px);
            display: flex;
            flex-direction: column;
            z-index: 200;
            overflow: hidden;
            animation: pdForgeAgentIn 0.3s cubic-bezier(0.22, 1, 0.36, 1);
        }
        @keyframes pdForgeAgentIn {
            from { opacity: 0; transform: translateY(20px) scale(0.95); }
            to   { opacity: 1; transform: translateY(0) scale(1); }
        }
        .pd-forge-agent-header {
            display: flex;
            align-items: center;
            justify-content: space-between;
            padding: 0.6rem 0.9rem;
            background: linear-gradient(135deg, rgba(212,168,83,0.12), rgba(168,85,247,0.08));
            border-bottom: 1px solid rgba(212,168,83,0.15);
            cursor: default;
        }
        .pd-forge-agent-title {
            font-size: 0.8rem;
            font-weight: 700;
            color: #D4A853;
            display: flex;
            align-items: center;
            gap: 0.4rem;
            letter-spacing: 0.03em;
        }
        .pd-forge-agent-controls {
            display: flex;
            gap: 0.3rem;
        }
        .pd-forge-agent-controls button {
            width: 24px;
            height: 24px;
            border-radius: 50%;
            border: 1px solid rgba(255,255,255,0.1);
            background: rgba(255,255,255,0.05);
            color: var(--text-muted);
            cursor: pointer;
            font-size: 0.8rem;
            display: flex;
            align-items: center;
            justify-content: center;
            transition: all 0.2s;
        }
        .pd-forge-agent-controls button:hover {
            background: rgba(255,255,255,0.12);
            color: var(--text-primary);
        }
        .pd-forge-agent-body {
            flex: 1;
            display: flex;
            flex-direction: column;
            overflow: hidden;
        }
        .pd-forge-agent-messages {
            flex: 1;
            overflow-y: auto;
            padding: 0.75rem;
            display: flex;
            flex-direction: column;
            gap: 0.5rem;
        }
        .pd-forge-agent-welcome {
            font-size: 0.8rem;
            color: var(--text-secondary);
            line-height: 1.6;
            padding: 0.6rem 0.75rem;
            background: rgba(212,168,83,0.06);
            border: 1px solid rgba(212,168,83,0.1);
            border-radius: 10px;
        }
        .pd-forge-agent-msg {
            padding: 0.5rem 0.75rem;
            border-radius: 10px;
            font-size: 0.8rem;
            line-height: 1.6;
            max-width: 88%;
            word-wrap: break-word;
        }
        .pd-forge-agent-msg.user {
            background: rgba(212,168,83,0.12);
            color: #e2c97d;
            align-self: flex-end;
            border-bottom-right-radius: 4px;
        }
        .pd-forge-agent-msg.assistant {
            background: rgba(255,255,255,0.05);
            color: var(--text-secondary);
            align-self: flex-start;
            border-bottom-left-radius: 4px;
        }
        .pd-forge-agent-msg .forge-update-badge {
            font-size: 0.65rem;
            color: #4ade80;
            margin-top: 0.3rem;
            display: block;
        }
        .pd-forge-agent-typing {
            padding: 0.5rem 0.75rem;
            font-size: 0.75rem;
            color: var(--text-muted);
            font-style: italic;
        }
        .pd-forge-agent-input-row {
            display: flex;
            gap: 0.4rem;
            padding: 0.5rem 0.75rem 0.75rem;
            border-top: 1px solid rgba(255,255,255,0.06);
            background: rgba(0,0,0,0.2);
        }
        .pd-forge-agent-textarea {
            flex: 1;
            padding: 0.5rem 0.6rem;
            background: rgba(255,255,255,0.05);
            border: 1px solid rgba(212,168,83,0.2);
            border-radius: 8px;
            color: var(--text-primary);
            font-size: 0.8rem;
            font-family: inherit;
            resize: none;
            line-height: 1.4;
        }
        .pd-forge-agent-textarea:focus {
            outline: none;
            border-color: rgba(212,168,83,0.4);
        }
        .pd-forge-agent-send-btn {
            width: 36px;
            height: 36px;
            border-radius: 8px;
            background: linear-gradient(135deg, rgba(212,168,83,0.2), rgba(212,168,83,0.1));
            border: 1px solid rgba(212,168,83,0.3);
            color: #D4A853;
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            transition: all 0.2s;
            flex-shrink: 0;
            align-self: flex-end;
        }
        .pd-forge-agent-send-btn:hover {
            background: linear-gradient(135deg, rgba(212,168,83,0.3), rgba(212,168,83,0.15));
            box-shadow: 0 0 10px rgba(212,168,83,0.2);
        }

        /* Forge Agent FAB */
        .pd-forge-agent-fab {
            position: absolute;
            bottom: 24px;
            right: 24px;
            width: 48px;
            height: 48px;
            border-radius: 50%;
            background: linear-gradient(135deg, rgba(212,168,83,0.3), rgba(168,85,247,0.2));
            border: 1px solid rgba(212,168,83,0.4);
            color: #D4A853;
            cursor: pointer;
            box-shadow: 0 4px 20px rgba(0,0,0,0.4), 0 0 16px rgba(212,168,83,0.15);
            z-index: 200;
            display: flex;
            align-items: center;
            justify-content: center;
            transition: all 0.3s;
            animation: pdFabPulse 3s ease-in-out infinite;
        }
        .pd-forge-agent-fab:hover {
            transform: scale(1.1);
            box-shadow: 0 6px 28px rgba(0,0,0,0.5), 0 0 24px rgba(212,168,83,0.25);
        }
        @keyframes pdFabPulse {
            0%, 100% { box-shadow: 0 4px 20px rgba(0,0,0,0.4), 0 0 16px rgba(212,168,83,0.15); }
            50% { box-shadow: 0 4px 20px rgba(0,0,0,0.4), 0 0 24px rgba(212,168,83,0.25); }
        }

        /* ── Forge Agent Tool Bar ── */
        .pd-forge-agent-tools {
            display: flex;
            gap: 4px;
            padding: 6px 10px;
            background: rgba(0,0,0,0.25);
            border-bottom: 1px solid rgba(255,255,255,0.06);
        }
        .pd-forge-tool-btn {
            flex: 1;
            padding: 4px 6px;
            font-size: 0.68rem;
            background: rgba(255,255,255,0.04);
            border: 1px solid rgba(255,255,255,0.08);
            border-radius: 6px;
            color: var(--text-secondary, #A0A0A0);
            cursor: pointer;
            transition: all 0.2s;
            white-space: nowrap;
        }
        .pd-forge-tool-btn:hover {
            background: rgba(212,168,83,0.12);
            border-color: rgba(212,168,83,0.3);
            color: #D4A853;
        }

        /* ── Forge Welcome Suggested Prompts ── */
        .pd-forge-suggest-row {
            display: flex;
            flex-direction: column;
            gap: 6px;
            margin-top: 0.25rem;
        }
        .pd-forge-suggest-btn {
            padding: 6px 10px;
            font-size: 0.75rem;
            text-align: left;
            background: rgba(212,168,83,0.06);
            border: 1px solid rgba(212,168,83,0.15);
            border-radius: 8px;
            color: rgba(212,168,83,0.9);
            cursor: pointer;
            transition: all 0.2s;
        }
        .pd-forge-suggest-btn:hover {
            background: rgba(212,168,83,0.15);
            border-color: rgba(212,168,83,0.35);
            color: #D4A853;
            transform: translateX(3px);
        }

        /* ── Section Updated Flash ── */
        @keyframes pdSectionFlash {
            0% { background: rgba(212,168,83,0.3); }
            100% { background: transparent; }
        }
        .pd-section-updated {
            animation: pdSectionFlash 1.5s ease-out;
        }

        /* ══ Proposal Designer Animations ══════════════════════ */

        /* Section canvas — leave (fade + slide up slightly) */
        @keyframes pdEditorLeave {
            from { opacity: 1; transform: translateY(0); }
            to   { opacity: 0; transform: translateY(-8px); }
        }
        /* Section canvas — enter (fade + slide up from below) */
        @keyframes pdEditorEnter {
            from { opacity: 0; transform: translateY(12px); }
            to   { opacity: 1; transform: translateY(0); }
        }
        #pdEditorArea.pd-section-leaving {
            animation: pdEditorLeave 0.12s ease forwards;
            pointer-events: none;
        }
        #pdEditorArea.pd-section-entering {
            animation: pdEditorEnter 0.22s cubic-bezier(0.22,1,0.36,1) forwards;
        }

        /* New section item — slide in from left */
        @keyframes pdSectionItemIn {
            from { opacity: 0; transform: translateX(-16px); }
            to   { opacity: 1; transform: translateX(0); }
        }
        .pd-section-item-new {
            animation: pdSectionItemIn 0.3s cubic-bezier(0.22,1,0.36,1) forwards;
        }

        /* Stronger active section state */
        .pd-section-item.active {
            background: linear-gradient(135deg, rgba(212,168,83,0.12), rgba(212,168,83,0.04));
            border-color: rgba(212,168,83,0.35);
            box-shadow: 0 2px 12px rgba(212,168,83,0.08), inset 0 0 0 1px rgba(212,168,83,0.1);
        }
        .pd-section-item.active::before { height: 65%; }
        .pd-section-item.active .pd-section-item-title {
            color: rgba(212,168,83,0.95);
        }

        /* Section item hover — subtle lift */
        .pd-section-item:hover {
            background: rgba(255,255,255,0.05);
            border-color: rgba(255,255,255,0.1);
            transform: translateX(2px);
            box-shadow: 0 1px 8px rgba(0,0,0,0.2);
        }
        .pd-section-item.active:hover { transform: none; }

        /* Research panel — shimmer for unresearched items */
        @keyframes pdResearchShimmer {
            0%   { background-position: -200% center; }
            100% { background-position: 200% center; }
        }
        .pd-research-cat-status.pending {
            background: linear-gradient(90deg,
                rgba(255,255,255,0.06) 0%,
                rgba(255,255,255,0.12) 50%,
                rgba(255,255,255,0.06) 100%);
            background-size: 200% 100%;
            animation: pdResearchShimmer 2.2s linear infinite;
            color: transparent;
            border-radius: 4px;
        }

        /* Research cat items — better hover with blue tint */
        .pd-research-cat:hover {
            background: rgba(59,130,246,0.06);
            border-color: rgba(59,130,246,0.2);
            transform: translateX(2px);
        }
        .pd-research-cat.active {
            background: rgba(59,130,246,0.12);
            border-color: rgba(59,130,246,0.35);
            box-shadow: 0 2px 8px rgba(59,130,246,0.1);
        }

        /* Add-section buttons — cascade entrance */
        @keyframes pdAddBtnIn {
            from { opacity: 0; transform: scale(0.92); }
            to   { opacity: 1; transform: scale(1); }
        }
        .pd-add-btn:nth-child(1) { animation: pdAddBtnIn 0.2s ease 0.00s both; }
        .pd-add-btn:nth-child(2) { animation: pdAddBtnIn 0.2s ease 0.04s both; }
        .pd-add-btn:nth-child(3) { animation: pdAddBtnIn 0.2s ease 0.08s both; }
        .pd-add-btn:nth-child(4) { animation: pdAddBtnIn 0.2s ease 0.12s both; }
        .pd-add-btn:nth-child(5) { animation: pdAddBtnIn 0.2s ease 0.16s both; }
        .pd-add-btn:nth-child(6) { animation: pdAddBtnIn 0.2s ease 0.20s both; }
        .pd-add-btn:nth-child(7) { animation: pdAddBtnIn 0.2s ease 0.24s both; }
        .pd-add-btn:nth-child(8) { animation: pdAddBtnIn 0.2s ease 0.28s both; }

        /* Add button — stronger hover */
        .pd-add-btn:hover {
            border-color: var(--gold-primary);
            border-style: solid;
            color: var(--gold-primary);
            background: rgba(212,168,83,0.1);
            transform: translateY(-1px);
            box-shadow: 0 3px 10px rgba(212,168,83,0.12);
        }

        /* Score ring — smooth fill transition */
        .pd-score-ring-fill {
            transition: stroke-dashoffset 0.8s cubic-bezier(0.22,1,0.36,1);
        }

        /* Completeness inline bar (left panel) */
        @keyframes pdBarFill {
            from { width: 0; }
        }
        .pd-completeness-bar-fill {
            animation: pdBarFill 0.6s cubic-bezier(0.22,1,0.36,1) both;
        }

        /* ── Section Brief Field ── */
        .pd-brief-input {
            width: 100%;
            padding: 0.35rem 0.5rem;
            margin-top: 0.3rem;
            background: rgba(212,168,83,0.04);
            border: 1px dashed rgba(212,168,83,0.2);
            border-radius: 4px;
            color: var(--text-muted);
            font-size: 0.7rem;
            font-style: italic;
        }
        .pd-brief-input:focus {
            outline: none;
            border-style: solid;
            border-color: rgba(212,168,83,0.3);
            color: var(--text-secondary);
        }

        .pd-ai-suggestion {
            margin-top: 1rem;
            padding: 1rem;
            background: rgba(0,0,0,0.3);
            border-radius: 8px;
            border-left: 3px solid #a78bfa;
        }
        .pd-ai-suggestion-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 0.75rem;
        }
        .pd-ai-suggestion-title {
            font-size: 0.7rem;
            color: #a78bfa;
            letter-spacing: 0.08em;
            text-transform: uppercase;
        }
        .pd-ai-suggestion-actions {
            display: flex;
            gap: 0.5rem;
        }
        .pd-ai-apply-btn {
            padding: 0.35rem 0.75rem;
            font-size: 0.7rem;
            border-radius: 5px;
            cursor: pointer;
            font-family: inherit;
            transition: all 0.15s ease;
        }
        .pd-ai-apply-btn.accept {
            background: rgba(34,197,94,0.2);
            border: 1px solid rgba(34,197,94,0.4);
            color: #4ade80;
        }
        .pd-ai-apply-btn.accept:hover { background: rgba(34,197,94,0.3); }
        .pd-ai-apply-btn.reject {
            background: transparent;
            border: 1px solid rgba(255,255,255,0.1);
            color: var(--text-muted);
        }
        .pd-ai-apply-btn.reject:hover { border-color: rgba(239,68,68,0.4); color: #f87171; }
        .pd-ai-suggestion-content {
            font-size: 0.9rem;
            line-height: 1.6;
            color: var(--text-secondary);
            white-space: pre-wrap;
        }
        .pd-ai-pricing-suggestion {
            display: grid;
            grid-template-columns: repeat(3, 1fr);
            gap: 1rem;
            margin-bottom: 1rem;
        }
        .pd-ai-pricing-item {
            text-align: center;
            padding: 0.75rem;
            background: rgba(34,197,94,0.1);
            border-radius: 8px;
        }
        .pd-ai-pricing-value {
            font-size: 1.5rem;
            font-weight: 600;
            color: #4ade80;
        }
        .pd-ai-pricing-label {
            font-size: 0.65rem;
            color: var(--text-muted);
            letter-spacing: 0.08em;
            text-transform: uppercase;
            margin-top: 0.25rem;
        }
        .pd-ai-rationale {
            font-size: 0.85rem;
            color: var(--text-secondary);
            line-height: 1.6;
            padding-top: 0.75rem;
            border-top: 1px solid rgba(255,255,255,0.06);
        }

        /* Talk-Through Panel */
        .pd-talk-through-panel {
            background: linear-gradient(135deg, rgba(139,92,246,0.06), rgba(139,92,246,0.02));
            border: 1px solid rgba(139,92,246,0.2);
            border-radius: 10px;
            margin-top: 0.75rem;
            overflow: hidden;
        }
        .pd-tt-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 0.5rem 0.75rem;
            background: rgba(139,92,246,0.08);
            border-bottom: 1px solid rgba(139,92,246,0.15);
        }

        /* Email Management in Details */
        .email-edit-container {
            display: flex;
            gap: 0.5rem;
            margin-bottom: 0.5rem;
        }
        .email-input {
            flex: 1;
            padding: 0.5rem 0.75rem;
            background: var(--bg-input);
            border: 1px solid var(--border-subtle);
            border-radius: 6px;
            color: var(--text-primary);
            font-size: 0.85rem;
            font-family: inherit;
        }
        .email-input:focus {
            outline: none;
            border-color: var(--gold-primary);
        }
        .email-save-btn {
            width: 36px;
            height: 36px;
            background: var(--gold-primary);
            border: none;
            border-radius: 6px;
            color: var(--bg-deep);
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            transition: all 0.2s ease;
        }
        .email-save-btn:hover {
            transform: scale(1.05);
        }
        .email-save-btn svg {
            width: 18px;
            height: 18px;
        }
        .email-link {
            color: var(--gold-primary);
            font-size: 0.8rem;
            text-decoration: none;
        }
        .email-link:hover {
            text-decoration: underline;
        }
        .no-email-warning {
            color: var(--warning);
            font-size: 0.75rem;
            font-style: italic;
        }
        
        /* Smart Drafting Card */
        .ai-drafting-card {
            background: linear-gradient(135deg, rgba(212, 168, 83, 0.05) 0%, var(--bg-card) 100%);
            border: 1px solid rgba(212, 168, 83, 0.2);
        }
        .ai-drafting-card .detail-card-title {
            display: flex;
            align-items: center;
            gap: 0.5rem;
            color: var(--gold-primary);
        }
        .ai-description {
            font-size: 0.8rem;
            color: var(--text-muted);
            margin-bottom: 1rem;
        }
        .ai-actions {
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 0.5rem;
        }
        .ai-btn {
            padding: 0.6rem 0.75rem;
            background: var(--bg-deep);
            border: 1px solid var(--border-subtle);
            border-radius: 6px;
            color: var(--text-secondary);
            font-size: 0.8rem;
            font-family: inherit;
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 0.4rem;
            transition: all 0.2s ease;
        }
        .ai-btn:hover {
            border-color: var(--gold-primary);
            color: var(--gold-primary);
            background: rgba(212, 168, 83, 0.1);
        }
        .ai-btn.research {
            grid-column: span 2;
            background: rgba(96, 165, 250, 0.1);
            border-color: rgba(96, 165, 250, 0.3);
            color: var(--info);
        }
        .ai-btn.research:hover {
            border-color: var(--info);
            background: rgba(96, 165, 250, 0.2);
        }
        .ai-btn svg {
            width: 14px;
            height: 14px;
        }
        .ai-btn.loading {
            pointer-events: none;
            opacity: 0.7;
        }
        .ai-btn.loading::after {
            content: '';
            width: 14px;
            height: 14px;
            border: 2px solid transparent;
            border-top-color: currentColor;
            border-radius: 50%;
            animation: spin 0.8s linear infinite;
        }
        
        /* AI Output */
        .ai-output {
            margin-top: 1rem;
            background: var(--bg-deep);
            border-radius: 8px;
            border: 1px solid var(--border-subtle);
            overflow: hidden;
        }
        .ai-output-header {
            display: flex;
            align-items: center;
            justify-content: space-between;
            padding: 0.5rem 0.75rem;
            background: rgba(212, 168, 83, 0.1);
            border-bottom: 1px solid var(--border-subtle);
            font-size: 0.75rem;
            font-weight: 600;
            color: var(--gold-primary);
        }
        .ai-output-actions {
            display: flex;
            gap: 0.25rem;
        }
        .ai-output-actions button {
            width: 28px;
            height: 28px;
            background: transparent;
            border: none;
            color: var(--text-muted);
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            border-radius: 4px;
            transition: all 0.2s ease;
        }
        .ai-output-actions button:hover {
            color: var(--gold-primary);
            background: rgba(212, 168, 83, 0.1);
        }
        .ai-output-actions button svg {
            width: 14px;
            height: 14px;
        }
        .ai-output-content {
            padding: 0.75rem;
            font-size: 0.85rem;
            line-height: 1.6;
            color: var(--text-primary);
            max-height: 300px;
            overflow-y: auto;
            white-space: pre-wrap;
        }
        .ai-output-content h4 {
            color: var(--gold-primary);
            margin: 0.75rem 0 0.5rem;
            font-size: 0.9rem;
        }
        .ai-output-content h4:first-child {
            margin-top: 0;
        }
        .ai-output-content ul {
            margin: 0.5rem 0;
            padding-left: 1.25rem;
        }
        .ai-output-content li {
            margin-bottom: 0.25rem;
        }
        
        .press-modal {
            position: fixed;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background: rgba(0, 0, 0, 0.85);
            z-index: 10000;
            display: flex;
            align-items: center;
            justify-content: center;
            opacity: 0;
            visibility: hidden;
            transition: all 0.3s ease;
            cursor: pointer; /* Click outside to close */
            overflow-y: auto; /* Allow scrolling if modal is taller than viewport */
            padding: 2rem;
        }
        .press-modal.active {
            opacity: 1;
            visibility: visible;
        }
        .press-modal-content {
            width: 95vw;
            max-width: 1200px;
            max-height: calc(100vh - 4rem);
            background: var(--bg-card);
            border-radius: 16px;
            display: flex;
            flex-direction: column;
            overflow: hidden;
            border: 1px solid var(--border-subtle);
            position: relative;
            cursor: default; /* Reset cursor inside modal */
            flex-shrink: 0;
        }
        /* Modal body - the scrollable content area */
        .press-modal-body,
        .press-modal-content > div:not(.press-modal-header):not(.press-modal-footer):not([class]) {
            overflow-y: auto;
            flex: 1;
            min-height: 0; /* Important for flex children to scroll */
        }
        .press-modal-header {
            display: flex;
            align-items: center;
            justify-content: space-between;
            padding: 1.25rem 1.5rem;
            background: linear-gradient(135deg, var(--bg-deep) 0%, var(--bg-card) 100%);
            border-bottom: 1px solid var(--border-subtle);
        }
        .press-modal-header h2 {
            font-family: 'Space Grotesk', sans-serif;
            font-size: 1.3rem;
            color: var(--gold-primary);
            display: flex;
            align-items: center;
            gap: 0.75rem;
        }
        .press-modal-header h2 svg {
            width: 24px;
            height: 24px;
        }
        .press-modal-close {
            width: 40px;
            height: 40px;
            background: transparent;
            border: 1px solid var(--border-subtle);
            border-radius: 8px;
            color: var(--text-muted);
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            transition: all 0.2s ease;
        }
        .press-modal-close:hover {
            border-color: var(--error);
            color: var(--error);
            background: var(--error-bg);
        }
        .press-modal-close svg {
            width: 20px;
            height: 20px;
        }
        .press-modal-body {
            flex: 1;
            display: grid;
            grid-template-columns: 1fr 320px;
            overflow: hidden;
        }
        
        /* Compose Area */
        .press-compose {
            padding: 1.5rem;
            overflow-y: auto;
            display: flex;
            flex-direction: column;
            gap: 1.25rem;
        }
        .press-field {
            display: flex;
            flex-direction: column;
            gap: 0.5rem;
        }
        .press-field label {
            font-size: 0.8rem;
            font-weight: 600;
            color: var(--text-muted);
            text-transform: uppercase;
            letter-spacing: 0.05em;
        }
        .press-field input,
        .press-field textarea,
        .press-field select {
            padding: 0.875rem 1rem;
            background: var(--bg-input);
            border: 1px solid var(--border-subtle);
            border-radius: 8px;
            color: var(--text-primary);
            font-family: inherit;
            font-size: 0.95rem;
            transition: all 0.2s ease;
        }
        .press-field input:focus,
        .press-field textarea:focus,
        .press-field select:focus {
            outline: none;
            border-color: var(--gold-primary);
            box-shadow: 0 0 0 3px rgba(212, 168, 83, 0.1);
        }
        .press-field textarea {
            min-height: 300px;
            resize: vertical;
            line-height: 1.6;
        }
        .press-field-hint {
            font-size: 0.75rem;
            color: var(--text-muted);
        }
        .press-tokens {
            display: flex;
            flex-wrap: wrap;
            gap: 0.5rem;
        }
        .press-token {
            padding: 0.35rem 0.65rem;
            background: var(--bg-deep);
            border: 1px solid var(--border-subtle);
            border-radius: 4px;
            font-family: 'Space Grotesk', sans-serif;
            font-size: 0.75rem;
            color: var(--gold-primary);
            cursor: pointer;
            transition: all 0.2s ease;
        }
        .press-token:hover {
            border-color: var(--gold-primary);
            background: rgba(212, 168, 83, 0.1);
        }
        
        /* Recipients Panel */
        .press-recipients {
            background: var(--bg-deep);
            border-left: 1px solid var(--border-subtle);
            display: flex;
            flex-direction: column;
        }
        .press-recipients-header {
            padding: 1rem 1.25rem;
            border-bottom: 1px solid var(--border-subtle);
        }
        .press-recipients-header h3 {
            font-size: 0.9rem;
            color: var(--text-primary);
            margin-bottom: 0.75rem;
        }
        .press-recipients-stats {
            display: flex;
            gap: 1rem;
            font-size: 0.8rem;
        }
        .press-recipients-stats span {
            color: var(--text-muted);
        }
        .press-recipients-stats strong {
            color: var(--gold-primary);
        }
        .press-recipients-filters {
            padding: 0.75rem 1.25rem;
            border-bottom: 1px solid var(--border-subtle);
            display: flex;
            flex-direction: column;
            gap: 0.75rem;
        }
        .press-recipients-filters select {
            padding: 0.5rem 0.75rem;
            background: var(--bg-input);
            border: 1px solid var(--border-subtle);
            border-radius: 6px;
            color: var(--text-primary);
            font-size: 0.85rem;
        }
        .press-recipients-list {
            flex: 1;
            overflow-y: auto;
            padding: 0.75rem;
        }
        .press-recipient-item {
            padding: 0.65rem 0.75rem;
            background: var(--bg-card);
            border-radius: 6px;
            margin-bottom: 0.5rem;
            display: flex;
            align-items: center;
            gap: 0.75rem;
            cursor: pointer;
            transition: all 0.2s ease;
        }
        .press-recipient-item:hover {
            background: var(--bg-elevated);
        }
        .press-recipient-item.selected {
            border: 1px solid var(--gold-primary);
            background: rgba(212, 168, 83, 0.1);
        }
        .press-recipient-item input[type="checkbox"] {
            width: 16px;
            height: 16px;
            accent-color: var(--gold-primary);
        }
        .press-recipient-info {
            flex: 1;
            min-width: 0;
        }
        .press-recipient-name {
            font-size: 0.85rem;
            color: var(--text-primary);
            font-weight: 500;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
        }
        .press-recipient-meta {
            font-size: 0.7rem;
            color: var(--text-muted);
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
        }
        .press-recipient-email {
            font-size: 0.7rem;
            color: var(--gold-primary);
        }
        .press-no-email {
            font-size: 0.7rem;
            color: var(--error);
            font-style: italic;
        }
        
        /* Footer */
        .press-modal-footer {
            padding: 1rem 1.5rem;
            background: var(--bg-deep);
            border-top: 1px solid var(--border-subtle);
            display: flex;
            justify-content: space-between;
            align-items: center;
        }
        .press-footer-info {
            font-size: 0.85rem;
            color: var(--text-muted);
        }
        .press-footer-info strong {
            color: var(--gold-primary);
        }
        .press-footer-actions {
            display: flex;
            gap: 0.75rem;
        }
        .press-btn {
            padding: 0.65rem 1.25rem;
            border-radius: 8px;
            font-family: inherit;
            font-size: 0.85rem;
            font-weight: 600;
            cursor: pointer;
            display: flex;
            align-items: center;
            gap: 0.5rem;
            transition: all 0.2s ease;
        }
        .press-btn svg {
            width: 16px;
            height: 16px;
        }
        .press-btn.secondary {
            background: transparent;
            border: 1px solid var(--border-subtle);
            color: var(--text-secondary);
        }
        .press-btn.secondary:hover {
            border-color: var(--gold-primary);
            color: var(--gold-primary);
        }
        .press-btn.primary {
            background: var(--gold-primary);
            border: none;
            color: var(--bg-deep);
        }
        .press-btn.primary:hover {
            transform: translateY(-2px);
            box-shadow: 0 4px 12px rgba(212, 168, 83, 0.3);
        }
        .press-btn.primary:disabled {
            opacity: 0.5;
            cursor: not-allowed;
            transform: none;
        }
        .press-btn.send-action {
            background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
            border: none;
            color: white;
            font-weight: 600;
            padding: 0.7rem 1.5rem;
            box-shadow: 0 4px 14px rgba(34, 197, 94, 0.3);
        }
        .press-btn.send-action:hover {
            transform: translateY(-2px);
            box-shadow: 0 6px 20px rgba(34, 197, 94, 0.45);
        }
        
        /* Sending Progress */
        .press-sending-overlay {
            position: absolute;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background: rgba(10, 10, 15, 0.95);
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            z-index: 10;
        }
        .press-sending-spinner {
            width: 48px;
            height: 48px;
            border: 3px solid var(--border-subtle);
            border-top-color: var(--gold-primary);
            border-radius: 50%;
            animation: spin 1s linear infinite;
            margin-bottom: 1rem;
        }
        .press-sending-text {
            color: var(--text-primary);
            font-size: 1rem;
            margin-bottom: 0.5rem;
        }
        .press-sending-progress {
            color: var(--gold-primary);
            font-size: 0.9rem;
        }
        
        /* History View */
        .press-history-list {
            padding: 1rem;
        }
        .press-history-item {
            background: var(--bg-card);
            border: 1px solid var(--border-subtle);
            border-radius: 8px;
            padding: 1rem;
            margin-bottom: 0.75rem;
            cursor: pointer;
            transition: all 0.2s ease;
        }
        .press-history-item:hover {
            border-color: var(--gold-primary);
        }
        .press-history-subject {
            font-weight: 600;
            color: var(--text-primary);
            margin-bottom: 0.5rem;
        }
        .press-history-meta {
            display: flex;
            gap: 1rem;
            font-size: 0.8rem;
            color: var(--text-muted);
        }
        .press-history-stat {
            display: flex;
            align-items: center;
            gap: 0.25rem;
        }
        .press-history-stat.success { color: var(--success); }
        .press-history-stat.failed { color: var(--error); }

        /* ===== PRESS CAMPAIGN SYSTEM ===== */
        .press-campaign {
            position: fixed;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background: rgba(0, 0, 0, 0.9);
            backdrop-filter: blur(10px);
            z-index: 1000;
            opacity: 0;
            visibility: hidden;
            transition: all 0.3s ease;
        }
        
        .press-campaign.active {
            opacity: 1;
            visibility: visible;
        }
        
        .press-campaign-content {
            width: 100%;
            height: 100%;
            background: var(--bg-deep);
            display: flex;
            flex-direction: column;
        }
        
        .press-campaign-header {
            display: flex;
            align-items: center;
            padding: 1rem 1.5rem;
            background: linear-gradient(135deg, rgba(212, 175, 55, 0.15) 0%, transparent 100%);
            border-bottom: 1px solid var(--border-subtle);
            gap: 2rem;
        }
        
        .press-campaign-header h2 {
            display: flex;
            align-items: center;
            gap: 0.75rem;
            font-family: 'Space Grotesk', sans-serif;
            font-size: 1.1rem;
            color: var(--gold-primary);
            margin: 0;
            white-space: nowrap;
        }
        
        .press-campaign-steps {
            display: flex;
            align-items: center;
            gap: 0.5rem;
            flex: 1;
        }
        
        .campaign-step {
            display: flex;
            align-items: center;
            gap: 0.5rem;
            padding: 0.5rem 1rem;
            background: rgba(255, 255, 255, 0.03);
            border: 1px solid var(--border-subtle);
            border-radius: 6px;
            color: var(--text-muted);
            font-size: 0.8rem;
            transition: all 0.2s ease;
        }
        
        .campaign-step.active {
            background: rgba(212, 175, 55, 0.15);
            border-color: var(--gold-primary);
            color: var(--gold-primary);
        }
        
        .campaign-step.completed {
            background: rgba(34, 197, 94, 0.1);
            border-color: #22c55e;
            color: #22c55e;
        }
        
        .campaign-step-num {
            width: 20px;
            height: 20px;
            display: flex;
            align-items: center;
            justify-content: center;
            background: currentColor;
            color: var(--bg-deep);
            border-radius: 50%;
            font-size: 0.7rem;
            font-weight: 700;
        }
        
        .campaign-step-label {
            display: none;
        }
        
        @media (min-width: 900px) {
            .campaign-step-label { display: inline; }
        }
        
        .press-campaign-body {
            flex: 1;
            overflow: hidden;
        }
        
        .press-compose-split {
            display: grid;
            grid-template-columns: 1fr 450px;
            height: 100%;
        }
        
        @media (max-width: 1100px) {
            .press-compose-split {
                grid-template-columns: 1fr;
            }
            .press-compose-right {
                display: none;
            }
        }
        
        .press-compose-left {
            padding: 1.5rem;
            overflow-y: auto;
            display: flex;
            flex-direction: column;
            gap: 1rem;
        }
        
        .press-compose-left .press-field label {
            display: block;
            font-size: 0.85rem;
            font-weight: 600;
            color: var(--text-secondary);
            margin-bottom: 0.5rem;
        }
        
        .press-compose-left .press-field input[type="text"] {
            width: 100%;
            padding: 0.75rem 1rem;
            background: var(--bg-input);
            border: 1px solid var(--border-subtle);
            border-radius: 6px;
            color: var(--text-primary);
            font-size: 0.95rem;
        }
        
        .press-compose-left .press-field input[type="text"]:focus {
            outline: none;
            border-color: var(--gold-primary);
        }
        
        .press-compose-right {
            background: var(--bg-card);
            border-left: 1px solid var(--border-subtle);
            display: flex;
            flex-direction: column;
        }
        
        .press-preview-header {
            display: flex;
            align-items: center;
            gap: 0.5rem;
            padding: 1rem 1.25rem;
            border-bottom: 1px solid var(--border-subtle);
            font-size: 0.85rem;
            font-weight: 600;
            color: var(--text-primary);
        }
        
        .press-preview-device {
            flex: 1;
            display: flex;
            flex-direction: column;
            background: #f5f5f5;
            margin: 1rem;
            border-radius: 12px;
            overflow: hidden;
            box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
        }
        
        .press-preview-toolbar {
            display: flex;
            align-items: center;
            justify-content: space-between;
            padding: 0.75rem 1rem;
            background: #e8e8e8;
            border-bottom: 1px solid #ddd;
        }
        
        .preview-dots {
            display: flex;
            gap: 6px;
        }
        
        .preview-dots span {
            width: 10px;
            height: 10px;
            border-radius: 50%;
            background: #ccc;
        }
        
        .preview-dots span:first-child { background: #ff5f56; }
        .preview-dots span:nth-child(2) { background: #ffbd2e; }
        .preview-dots span:nth-child(3) { background: #27ca40; }
        
        .preview-client-switcher {
            display: flex;
            gap: 4px;
        }
        
        .preview-client {
            padding: 0.35rem 0.75rem;
            border: none;
            background: transparent;
            color: #666;
            font-size: 0.75rem;
            cursor: pointer;
            border-radius: 4px;
            transition: all 0.15s ease;
        }
        
        .preview-client:hover { background: rgba(0, 0, 0, 0.05); }
        .preview-client.active { background: white; color: #333; box-shadow: 0 1px 3px rgba(0,0,0,0.1); }
        
        .press-preview-frame {
            flex: 1;
            overflow-y: auto;
            background: white;
        }
        
        .email-preview-container {
            padding: 0;
        }
        
        .email-preview-container.gmail {
            font-family: 'Google Sans', Arial, sans-serif;
        }
        
        .email-preview-container.outlook {
            font-family: 'Segoe UI', Arial, sans-serif;
        }
        
        .email-preview-container.mobile {
            max-width: 375px;
            margin: 0 auto;
        }
        
        .press-tokens-hint {
            padding: 0.75rem;
            background: rgba(212, 175, 55, 0.1);
            border: 1px solid rgba(212, 175, 55, 0.2);
            border-radius: 6px;
            font-size: 0.8rem;
            color: var(--text-secondary);
        }
        
        .press-tokens-hint strong {
            color: var(--gold-primary);
        }
        
        /* Recipients Container */
        .recipients-container {
            display: grid;
            grid-template-columns: 400px 1fr;
            height: 100%;
        }
        
        .recipients-sidebar {
            background: var(--bg-card);
            border-right: 1px solid var(--border-subtle);
            display: flex;
            flex-direction: column;
        }
        
        .recipients-header {
            padding: 1.25rem;
            border-bottom: 1px solid var(--border-subtle);
        }
        
        .recipients-header h3 {
            margin: 0 0 0.5rem 0;
            font-size: 1rem;
            color: var(--text-primary);
        }
        
        .recipients-stats {
            display: flex;
            gap: 1rem;
            font-size: 0.8rem;
            color: var(--text-muted);
        }
        
        .recipients-stats strong { color: var(--gold-primary); }
        
        .recipients-filters {
            padding: 1rem 1.25rem;
            border-bottom: 1px solid var(--border-subtle);
            display: flex;
            flex-direction: column;
            gap: 0.75rem;
        }
        
        .recipients-filters select {
            padding: 0.5rem;
            background: var(--bg-input);
            border: 1px solid var(--border-subtle);
            border-radius: 6px;
            color: var(--text-primary);
            font-size: 0.85rem;
        }
        
        .recipients-select-all {
            display: flex;
            align-items: center;
            gap: 0.5rem;
            font-size: 0.85rem;
            color: var(--text-secondary);
            cursor: pointer;
        }
        
        .recipients-list {
            flex: 1;
            overflow-y: auto;
            padding: 0.5rem;
        }
        
        .recipient-item {
            display: flex;
            align-items: flex-start;
            gap: 0.75rem;
            padding: 0.75rem;
            border-radius: 6px;
            cursor: pointer;
            transition: all 0.15s ease;
        }
        
        .recipient-item:hover {
            background: rgba(255, 255, 255, 0.03);
        }
        
        .recipient-item.selected {
            background: rgba(212, 175, 55, 0.1);
        }
        
        .recipient-item.previewing {
            background: rgba(59, 130, 246, 0.15);
            border: 1px solid rgba(59, 130, 246, 0.3);
        }
        
        .recipient-item.key-used {
            opacity: 0.6;
            background: rgba(34, 197, 94, 0.05);
        }
        
        .recipient-item.no-key {
            border-left: 3px solid #f59e0b;
        }
        
        .key-used-badge {
            display: inline-block;
            padding: 0.15rem 0.4rem;
            border-radius: 4px;
            font-size: 0.65rem;
            font-weight: 500;
            background: rgba(34, 197, 94, 0.15);
            color: #22c55e;
            margin-left: 0.5rem;
        }
        
        .no-key-badge {
            display: inline-block;
            padding: 0.15rem 0.4rem;
            border-radius: 4px;
            font-size: 0.65rem;
            font-weight: 500;
            background: rgba(245, 158, 11, 0.15);
            color: #f59e0b;
            margin-left: 0.5rem;
        }
        
        .has-key-badge {
            font-size: 0.7rem;
            opacity: 0.7;
        }
        
        .contact-type-badge {
            display: inline-block;
            padding: 0.15rem 0.4rem;
            border-radius: 4px;
            font-size: 0.65rem;
            background: rgba(212, 168, 85, 0.15);
            color: var(--gold-primary);
            margin-right: 0.5rem;
        }
        
        .press-recipient-item.key-used {
            opacity: 0.6;
            background: rgba(34, 197, 94, 0.05);
        }
        
        .recipient-info { flex: 1; min-width: 0; }
        .recipient-name { font-weight: 500; color: var(--text-primary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
        .recipient-meta { font-size: 0.75rem; color: var(--text-muted); margin-top: 0.25rem; display: flex; align-items: center; flex-wrap: wrap; gap: 0.25rem; }
        .recipient-email { font-size: 0.75rem; color: var(--gold-primary); margin-top: 0.25rem; }
        
        .recipients-preview {
            display: flex;
            flex-direction: column;
            background: var(--bg-deep);
        }
        
        .recipients-preview-header {
            padding: 1.25rem;
            border-bottom: 1px solid var(--border-subtle);
        }
        
        .recipients-preview-header h3 {
            margin: 0;
            font-size: 1rem;
            color: var(--text-primary);
        }
        
        .recipients-preview-header p {
            margin: 0.5rem 0 0;
            font-size: 0.85rem;
            color: var(--text-muted);
        }
        
        .recipients-preview-frame {
            flex: 1;
            overflow: hidden;
            background: #f5f5f5;
            margin: 1rem;
            border-radius: 8px;
        }
        
        .no-recipient-selected {
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            height: 100%;
            color: var(--text-muted);
            text-align: center;
            padding: 2rem;
        }
        
        .no-recipient-selected svg { opacity: 0.3; margin-bottom: 1rem; }
        
        /* Send & Track */
        .send-track-container {
            display: flex;
            align-items: center;
            justify-content: center;
            height: 100%;
            padding: 2rem;
        }
        
        .send-summary {
            background: var(--bg-card);
            border: 1px solid var(--border-subtle);
            border-radius: 16px;
            padding: 2.5rem;
            max-width: 500px;
            width: 100%;
            text-align: center;
        }
        
        .send-summary-header {
            margin-bottom: 2rem;
        }
        
        .send-summary-header svg {
            color: var(--gold-primary);
            margin-bottom: 1rem;
        }
        
        .send-summary-header h3 {
            margin: 0;
            font-family: 'Space Grotesk', sans-serif;
            font-size: 1.5rem;
            color: var(--text-primary);
        }
        
        .send-summary-stats {
            display: flex;
            justify-content: center;
            gap: 2rem;
            margin-bottom: 2rem;
        }
        
        .send-stat {
            text-align: center;
        }
        
        .send-stat-value {
            font-size: 2.5rem;
            font-weight: 700;
            color: var(--gold-primary);
        }
        
        .send-stat-label {
            font-size: 0.8rem;
            color: var(--text-muted);
            text-transform: uppercase;
        }
        
        .send-summary-subject {
            background: var(--bg-deep);
            border-radius: 8px;
            padding: 1rem;
            margin-bottom: 1.5rem;
            text-align: left;
        }
        
        .send-summary-subject label {
            display: block;
            font-size: 0.7rem;
            color: var(--text-muted);
            text-transform: uppercase;
            margin-bottom: 0.5rem;
        }
        
        .send-summary-subject div {
            color: var(--text-primary);
            font-size: 0.95rem;
        }
        
        .send-options {
            display: flex;
            flex-direction: column;
            gap: 0.75rem;
            margin-bottom: 2rem;
            text-align: left;
        }
        
        .send-option {
            display: flex;
            align-items: center;
            gap: 0.75rem;
            font-size: 0.9rem;
            color: var(--text-secondary);
            cursor: pointer;
        }
        
        .send-actions {
            display: flex;
            gap: 1rem;
            justify-content: center;
        }
        
        .press-btn.large {
            padding: 1rem 2rem;
            font-size: 1rem;
        }
        
        .send-progress, .send-complete {
            background: var(--bg-card);
            border: 1px solid var(--border-subtle);
            border-radius: 16px;
            padding: 2.5rem;
            max-width: 600px;
            width: 100%;
        }
        
        .send-progress-header h3 {
            margin: 0 0 1.5rem;
            text-align: center;
        }
        
        .send-progress-bar {
            height: 8px;
            background: var(--bg-deep);
            border-radius: 4px;
            overflow: hidden;
            margin-bottom: 1rem;
        }
        
        .send-progress-fill {
            height: 100%;
            background: linear-gradient(90deg, var(--gold-primary), #22c55e);
            width: 0%;
            transition: width 0.3s ease;
        }
        
        .send-progress-text {
            text-align: center;
            color: var(--text-muted);
            font-size: 0.9rem;
        }
        
        .send-progress-log {
            max-height: 200px;
            overflow-y: auto;
            margin-top: 1.5rem;
            padding: 1rem;
            background: var(--bg-deep);
            border-radius: 8px;
            font-family: 'Space Grotesk', sans-serif;
            font-size: 0.75rem;
        }
        
        .send-log-entry {
            padding: 0.25rem 0;
            color: var(--text-muted);
        }
        
        .send-log-entry.success { color: #22c55e; }
        .send-log-entry.error { color: #ef4444; }
        
        .send-complete {
            text-align: center;
        }
        
        .send-complete-icon {
            color: #22c55e;
            margin-bottom: 1rem;
        }
        
        .send-complete h3 {
            margin: 0 0 1.5rem;
            font-family: 'Space Grotesk', sans-serif;
            font-size: 1.5rem;
        }
        
        .send-complete-stats {
            display: flex;
            justify-content: center;
            gap: 2rem;
            margin-bottom: 1.5rem;
        }
        
        .complete-stat {
            font-size: 1.1rem;
        }
        
        .complete-stat.success { color: #22c55e; }
        .complete-stat.failed { color: #ef4444; }
        .complete-stat span { font-weight: 700; font-size: 1.5rem; }
        
        .send-complete p {
            color: var(--text-muted);
            margin-bottom: 2rem;
        }
        
        /* Full Preview */
        .full-preview-container {
            display: flex;
            flex-direction: column;
            height: 100%;
        }
        
        .full-preview-header {
            display: flex;
            align-items: center;
            justify-content: space-between;
            padding: 1rem 1.5rem;
            background: var(--bg-card);
            border-bottom: 1px solid var(--border-subtle);
        }
        
        .full-preview-info {
            display: flex;
            align-items: center;
            gap: 1rem;
        }
        
        .preview-label {
            font-size: 0.85rem;
            color: var(--text-muted);
        }
        
        .full-preview-info select {
            padding: 0.5rem 1rem;
            background: var(--bg-input);
            border: 1px solid var(--border-subtle);
            border-radius: 6px;
            color: var(--text-primary);
        }
        
        .full-preview-frame {
            flex: 1;
            background: #f0f0f0;
            padding: 2rem;
            overflow: auto;
        }
        
        .full-preview-frame iframe {
            width: 100%;
            max-width: 700px;
            height: 100%;
            min-height: 600px;
            margin: 0 auto;
            display: block;
            background: white;
            border: 1px solid #ddd;
            border-radius: 8px;
            box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
        }
        
        /* Campaign Footer */
        .press-campaign-footer {
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 1rem 1.5rem;
            background: var(--bg-card);
            border-top: 1px solid var(--border-subtle);
        }

        /* ===== OUTREACH HUB ===== */
        .outreach-hub {
            position: fixed;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background: rgba(0, 0, 0, 0.8);
            backdrop-filter: blur(8px);
            display: flex;
            align-items: center;
            justify-content: center;
            z-index: 1000;
            opacity: 0;
            visibility: hidden;
            transition: all 0.3s ease;
        }
        
        .outreach-hub.active {
            opacity: 1;
            visibility: visible;
        }
        
        .outreach-hub-content {
            width: 95%;
            max-width: 1200px;
            height: 90vh;
            max-height: 800px;
            background: var(--bg-card);
            border: 1px solid var(--border-subtle);
            border-radius: 16px;
            display: flex;
            flex-direction: column;
            overflow: hidden;
            box-shadow: 0 25px 80px rgba(0, 0, 0, 0.5);
        }
        
        .outreach-hub-header {
            display: flex;
            align-items: center;
            justify-content: space-between;
            padding: 1.25rem 1.5rem;
            background: linear-gradient(135deg, rgba(212, 175, 55, 0.15) 0%, transparent 100%);
            border-bottom: 1px solid var(--border-subtle);
        }
        
        .outreach-hub-header h2 {
            display: flex;
            align-items: center;
            gap: 0.75rem;
            font-family: 'Space Grotesk', sans-serif;
            font-size: 1.25rem;
            color: var(--gold-primary);
            margin: 0;
        }
        
        .outreach-hub-header h2 svg {
            width: 24px;
            height: 24px;
        }
        
        .outreach-hub-close {
            width: 36px;
            height: 36px;
            border: none;
            border-radius: 8px;
            background: rgba(255, 255, 255, 0.05);
            color: var(--text-muted);
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            transition: all 0.2s ease;
        }
        
        .outreach-hub-close:hover {
            background: rgba(239, 68, 68, 0.2);
            color: var(--error);
        }
        
        .outreach-hub-stats {
            display: grid;
            grid-template-columns: repeat(4, 1fr);
            gap: 1rem;
            padding: 1.25rem 1.5rem;
            background: var(--bg-deep);
            border-bottom: 1px solid var(--border-subtle);
        }
        
        .outreach-stat {
            background: var(--bg-card);
            border: 1px solid var(--border-subtle);
            border-radius: 12px;
            padding: 1rem;
            text-align: center;
            transition: all 0.2s ease;
        }
        
        .outreach-stat.highlight {
            border-color: var(--gold-primary);
            background: rgba(212, 175, 55, 0.1);
        }
        
        .outreach-stat.ready {
            border-color: #22c55e;
            background: rgba(34, 197, 94, 0.1);
        }
        
        .outreach-stat-value {
            font-size: 2rem;
            font-weight: 700;
            color: var(--text-primary);
            line-height: 1;
        }
        
        .outreach-stat.highlight .outreach-stat-value { color: var(--gold-primary); }
        .outreach-stat.ready .outreach-stat-value { color: #22c55e; }
        
        .outreach-stat-label {
            font-size: 0.75rem;
            color: var(--text-muted);
            margin-top: 0.5rem;
            text-transform: uppercase;
            letter-spacing: 0.05em;
        }
        
        .outreach-hub-tabs {
            display: flex;
            border-bottom: 1px solid var(--border-subtle);
            background: var(--bg-card);
        }
        
        .outreach-tab {
            flex: 1;
            padding: 1rem;
            background: none;
            border: none;
            border-bottom: 2px solid transparent;
            color: var(--text-muted);
            font-family: inherit;
            font-size: 0.9rem;
            font-weight: 500;
            cursor: pointer;
            transition: all 0.2s ease;
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 0.5rem;
        }
        
        .outreach-tab:hover {
            color: var(--text-primary);
            background: rgba(255, 255, 255, 0.02);
        }
        
        .outreach-tab.active {
            color: var(--gold-primary);
            border-bottom-color: var(--gold-primary);
            background: rgba(212, 175, 55, 0.05);
        }
        
        .outreach-tab svg {
            width: 18px;
            height: 18px;
        }
        
        .outreach-hub-body {
            flex: 1;
            overflow: hidden;
            display: flex;
        }
        
        .outreach-panel {
            display: none;
            flex: 1;
            overflow: hidden;
        }
        
        .outreach-panel.active {
            display: flex;
            flex-direction: column;
        }
        
        /* Send Keys Panel */
        .send-keys-panel {
            display: flex;
            height: 100%;
        }
        
        .send-keys-compose {
            flex: 1;
            padding: 1.5rem;
            overflow-y: auto;
            display: flex;
            flex-direction: column;
            gap: 1.25rem;
        }
        
        .send-keys-recipients {
            width: 350px;
            background: var(--bg-deep);
            border-left: 1px solid var(--border-subtle);
            display: flex;
            flex-direction: column;
        }
        
        .send-keys-recipients-header {
            padding: 1rem 1.25rem;
            border-bottom: 1px solid var(--border-subtle);
        }
        
        .send-keys-recipients-header h3 {
            font-size: 0.9rem;
            color: var(--text-primary);
            margin: 0 0 0.5rem 0;
        }
        
        .send-keys-recipients-stats {
            display: flex;
            gap: 1rem;
            font-size: 0.8rem;
        }
        
        .send-keys-recipients-stats span { color: var(--text-muted); }
        .send-keys-recipients-stats strong { color: var(--gold-primary); }
        
        .send-keys-filters {
            padding: 0.75rem 1.25rem;
            border-bottom: 1px solid var(--border-subtle);
            display: flex;
            flex-direction: column;
            gap: 0.5rem;
        }
        
        .send-keys-filters select {
            padding: 0.5rem 0.75rem;
            background: var(--bg-input);
            border: 1px solid var(--border-subtle);
            border-radius: 6px;
            color: var(--text-primary);
            font-size: 0.85rem;
        }
        
        .send-keys-list {
            flex: 1;
            overflow-y: auto;
            padding: 0.5rem;
        }
        
        .send-keys-item {
            display: flex;
            align-items: flex-start;
            gap: 0.75rem;
            padding: 0.75rem;
            border-radius: 8px;
            cursor: pointer;
            transition: all 0.15s ease;
        }
        
        .send-keys-item:hover {
            background: rgba(255, 255, 255, 0.03);
        }
        
        .send-keys-item.selected {
            background: rgba(212, 175, 55, 0.1);
        }
        
        .send-keys-item.no-email {
            opacity: 0.5;
            cursor: not-allowed;
        }
        
        .send-keys-item-info {
            flex: 1;
            min-width: 0;
        }
        
        .send-keys-item-name {
            font-weight: 500;
            color: var(--text-primary);
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
        }
        
        .send-keys-item-meta {
            font-size: 0.75rem;
            color: var(--text-muted);
            margin-top: 0.25rem;
        }
        
        .send-keys-item-email {
            font-size: 0.75rem;
            color: var(--gold-primary);
            margin-top: 0.25rem;
        }
        
        .send-keys-item-key {
            font-size: 0.7rem;
            color: #22c55e;
            font-family: 'Space Grotesk', sans-serif;
            margin-top: 0.25rem;
        }
        
        .send-keys-no-email {
            font-size: 0.7rem;
            color: var(--error);
            margin-top: 0.25rem;
        }
        
        .send-keys-item.already-sent {
            opacity: 0.6;
            cursor: default;
            background: rgba(34, 197, 94, 0.05);
        }
        
        .send-keys-item.already-sent:hover {
            background: rgba(34, 197, 94, 0.05);
        }
        
        .send-keys-sent-status {
            font-size: 0.7rem;
            color: #22c55e;
            margin-top: 0.25rem;
            font-weight: 500;
        }
        
        .send-keys-footer {
            padding: 1rem 1.25rem;
            background: var(--bg-card);
            border-top: 1px solid var(--border-subtle);
            display: flex;
            justify-content: space-between;
            align-items: center;
        }
        
        .send-keys-footer-info {
            font-size: 0.85rem;
            color: var(--text-muted);
        }
        
        .send-keys-footer-info strong {
            color: var(--gold-primary);
        }
        
        .send-keys-actions {
            display: flex;
            gap: 0.75rem;
        }

        /* ===== PRESS AI GENERATOR ===== */
        .press-ai-generator {
            background: linear-gradient(135deg, rgba(212, 175, 55, 0.08) 0%, rgba(212, 175, 55, 0.02) 100%);
            border: 1px solid rgba(212, 175, 55, 0.2);
            border-radius: 12px;
            margin-bottom: 1.25rem;
            overflow: hidden;
        }
        
        .press-ai-header {
            display: flex;
            align-items: center;
            justify-content: space-between;
            padding: 0.875rem 1rem;
            background: rgba(0, 0, 0, 0.2);
            cursor: pointer;
        }
        
        .press-ai-title {
            display: flex;
            align-items: center;
            gap: 0.5rem;
            font-family: 'Space Grotesk', sans-serif;
            font-size: 0.85rem;
            font-weight: 600;
            color: var(--gold-primary);
        }
        
        .press-ai-toggle {
            width: 28px;
            height: 28px;
            border: none;
            border-radius: 6px;
            background: rgba(255, 255, 255, 0.05);
            color: var(--text-muted);
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            transition: all 0.2s ease;
        }
        
        .press-ai-toggle:hover {
            background: rgba(212, 175, 55, 0.2);
            color: var(--gold-primary);
        }
        
        .press-ai-toggle.collapsed svg {
            transform: rotate(-90deg);
        }
        
        .press-ai-content {
            padding: 1rem;
            display: flex;
            flex-direction: column;
            gap: 1rem;
        }
        
        .press-ai-content.collapsed {
            display: none;
        }
        
        .press-ai-row {
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 1rem;
        }
        
        .press-ai-field {
            display: flex;
            flex-direction: column;
            gap: 0.5rem;
        }
        
        .press-ai-field label {
            font-size: 0.75rem;
            font-weight: 600;
            color: var(--text-muted);
            text-transform: uppercase;
            letter-spacing: 0.05em;
        }
        
        .press-ai-field select,
        .press-ai-field textarea {
            padding: 0.75rem;
            background: var(--bg-input);
            border: 1px solid var(--border-subtle);
            border-radius: 8px;
            color: var(--text-primary);
            font-family: inherit;
            font-size: 0.9rem;
            transition: all 0.2s ease;
        }
        
        .press-ai-field select:focus,
        .press-ai-field textarea:focus {
            outline: none;
            border-color: var(--gold-primary);
            box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.1);
        }
        
        .press-ai-field textarea {
            min-height: 100px;
            resize: vertical;
            line-height: 1.5;
        }
        
        .press-audience-chips {
            display: flex;
            flex-wrap: wrap;
            gap: 0.5rem;
        }
        
        .press-chip {
            display: flex;
            align-items: center;
            gap: 0.35rem;
            padding: 0.5rem 0.75rem;
            background: var(--bg-deep);
            border: 1px solid var(--border-subtle);
            border-radius: 20px;
            font-size: 0.8rem;
            color: var(--text-secondary);
            cursor: pointer;
            transition: all 0.2s ease;
        }
        
        .press-chip:hover {
            border-color: var(--gold-primary);
            color: var(--text-primary);
        }
        
        .press-chip:has(input:checked) {
            background: rgba(212, 175, 55, 0.15);
            border-color: var(--gold-primary);
            color: var(--gold-primary);
        }
        
        .press-chip input {
            display: none;
        }
        
        .press-generate-btn {
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 0.5rem;
            padding: 0.875rem 1.5rem;
            background: linear-gradient(135deg, var(--gold-primary) 0%, #c9a227 100%);
            border: none;
            border-radius: 8px;
            color: var(--bg-deep);
            font-family: 'Space Grotesk', sans-serif;
            font-size: 0.9rem;
            font-weight: 600;
            cursor: pointer;
            transition: all 0.2s ease;
        }
        
        .press-generate-btn:hover {
            transform: translateY(-1px);
            box-shadow: 0 4px 15px rgba(212, 175, 55, 0.3);
        }
        
        .press-generate-btn:disabled {
            opacity: 0.6;
            cursor: not-allowed;
            transform: none;
        }
        
        .press-generate-btn.generating {
            position: relative;
            color: transparent;
        }
        
        .press-generate-btn.generating::after {
            content: '';
            position: absolute;
            width: 20px;
            height: 20px;
            border: 2px solid var(--bg-deep);
            border-top-color: transparent;
            border-radius: 50%;
            animation: spin 0.8s linear infinite;
        }

        /* ===== LIVING COMPOSER SYSTEM ===== */
        /* Unified rich editing for emails, press releases, and messaging */
        
        .living-composer {
            --composer-hue: 220;
            --composer-sat: 50%;
            --composer-accent: hsl(calc(var(--composer-hue) + 30), 70%, 50%);
            --composer-bg: hsl(var(--composer-hue), 15%, 12%);
            --composer-text: hsl(var(--composer-hue), 10%, 90%);
            position: relative;
            border-radius: 12px;
            overflow: hidden;
            transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
        }
        
        .living-composer-ambient {
            position: absolute;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            pointer-events: none;
            overflow: hidden;
            z-index: 0;
            border-radius: 12px;
        }
        
        .living-composer-orb {
            position: absolute;
            border-radius: 50%;
            filter: blur(40px);
            opacity: 0.08;
            transition: all 0.8s ease;
        }
        
        .living-composer-orb.orb-1 {
            width: 200px;
            height: 200px;
            background: var(--composer-accent);
            top: -50px;
            right: -50px;
            animation: composerFloat1 15s ease-in-out infinite;
        }
        
        .living-composer-orb.orb-2 {
            width: 150px;
            height: 150px;
            background: hsl(var(--composer-hue), var(--composer-sat), 30%);
            bottom: -30px;
            left: -30px;
            animation: composerFloat2 20s ease-in-out infinite;
        }
        
        @keyframes composerFloat1 {
            0%, 100% { transform: translate(0, 0) scale(1); }
            50% { transform: translate(-20px, 20px) scale(1.1); }
        }
        
        @keyframes composerFloat2 {
            0%, 100% { transform: translate(0, 0) scale(1); }
            50% { transform: translate(30px, -15px) scale(1.15); }
        }
        
        .living-composer-header {
            position: relative;
            z-index: 1;
            display: flex;
            align-items: center;
            justify-content: space-between;
            padding: 0.75rem 1rem;
            background: rgba(0, 0, 0, 0.3);
            border-bottom: 1px solid rgba(255, 255, 255, 0.1);
        }
        
        .living-composer-mode {
            display: flex;
            align-items: center;
            gap: 8px;
        }
        
        .living-composer-mode-dot {
            width: 6px;
            height: 6px;
            border-radius: 50%;
            background: var(--composer-accent);
            animation: composerPulse 2s ease-in-out infinite;
        }
        
        @keyframes composerPulse {
            0%, 100% { opacity: 1; }
            50% { opacity: 0.4; }
        }
        
        .living-composer-mode-label {
            font-size: 0.7rem;
            text-transform: uppercase;
            letter-spacing: 1.5px;
            color: var(--composer-accent);
            font-weight: 600;
        }
        
        .living-composer-toolbar {
            display: flex;
            gap: 4px;
        }
        
        .living-composer-toolbar button {
            width: 28px;
            height: 28px;
            border: none;
            border-radius: 6px;
            background: rgba(255, 255, 255, 0.05);
            color: var(--text-muted);
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            transition: all 0.2s ease;
        }
        
        .living-composer-toolbar button:hover {
            background: rgba(212, 175, 55, 0.2);
            color: var(--gold-primary);
        }
        
        .living-composer-toolbar button svg {
            width: 14px;
            height: 14px;
        }
        
        .living-composer-content {
            position: relative;
            z-index: 1;
            min-height: 250px;
            max-height: 400px;
            overflow-y: auto;
            padding: 1.25rem;
            background: rgba(0, 0, 0, 0.2);
            outline: none;
            font-family: 'Inter', sans-serif;
            font-size: 1.05rem;
            line-height: 1.7;
            color: var(--composer-text);
            transition: all 0.5s ease;
        }
        
        .living-composer-content:empty::before {
            content: attr(data-placeholder);
            color: rgba(255, 255, 255, 0.3);
            font-style: italic;
        }
        
        .living-composer-content:focus {
            outline: none;
        }
        
        .living-composer-content h1,
        .living-composer-content h2,
        .living-composer-content h3 {
            font-family: 'Space Grotesk', sans-serif;
            color: var(--composer-accent);
            margin: 0 0 0.75em 0;
            line-height: 1.3;
        }
        
        .living-composer-content h1 { font-size: 1.5em; }
        .living-composer-content h2 { font-size: 1.25em; }
        .living-composer-content h3 { font-size: 1.1em; }
        
        .living-composer-content p {
            margin: 0 0 1em 0;
        }
        
        .living-composer-content strong {
            color: var(--gold-primary);
            font-weight: 600;
        }
        
        .living-composer-content a {
            color: var(--composer-accent);
            text-decoration: underline;
        }
        
        .living-composer-content blockquote {
            border-left: 3px solid var(--composer-accent);
            padding-left: 1rem;
            margin: 1rem 0;
            font-style: italic;
            opacity: 0.9;
        }
        
        .living-composer-content ul,
        .living-composer-content ol {
            margin: 1em 0;
            padding-left: 1.5em;
        }
        
        .living-composer-content li {
            margin-bottom: 0.5em;
        }
        
        .living-composer-content li::marker {
            color: var(--composer-accent);
        }
        
        .living-composer-content code {
            font-family: 'Space Grotesk', sans-serif;
            background: rgba(0, 0, 0, 0.3);
            padding: 0.15em 0.4em;
            border-radius: 4px;
            font-size: 0.9em;
        }
        
        .living-composer-footer {
            position: relative;
            z-index: 1;
            display: flex;
            align-items: center;
            justify-content: space-between;
            padding: 0.75rem 1rem;
            background: rgba(0, 0, 0, 0.3);
            border-top: 1px solid rgba(255, 255, 255, 0.1);
            font-size: 0.75rem;
            color: var(--text-muted);
        }
        
        .living-composer-stats {
            display: flex;
            gap: 1rem;
        }
        
        .living-composer-mood {
            display: flex;
            align-items: center;
            gap: 6px;
        }
        
        .living-composer-mood-bar {
            display: flex;
            gap: 2px;
        }
        
        .living-composer-mood-segment {
            width: 3px;
            height: 12px;
            background: rgba(255, 255, 255, 0.15);
            border-radius: 2px;
            transition: all 0.3s ease;
        }
        
        .living-composer-mood-segment.active {
            background: var(--composer-accent);
        }
        
        /* Composer Mode Variants */
        .living-composer.mode-professional {
            --composer-hue: 220;
            --composer-sat: 50%;
        }
        
        .living-composer.mode-creative {
            --composer-hue: 280;
            --composer-sat: 60%;
        }
        
        .living-composer.mode-creative .living-composer-content {
            font-family: 'Playfair Display', Georgia, serif;
            font-size: 1.1rem;
            line-height: 1.8;
        }
        
        .living-composer.mode-formal {
            --composer-hue: 30;
            --composer-sat: 30%;
        }
        
        .living-composer.mode-formal .living-composer-content {
            font-family: 'Lora', Georgia, serif;
            text-align: justify;
        }
        
        .living-composer.mode-urgent {
            --composer-hue: 0;
            --composer-sat: 70%;
        }
        
        .living-composer.mode-urgent .living-composer-content h1,
        .living-composer.mode-urgent .living-composer-content h2 {
            text-transform: uppercase;
            letter-spacing: 1px;
        }
        
        .living-composer.mode-friendly {
            --composer-hue: 150;
            --composer-sat: 50%;
        }
        
        .living-composer.mode-friendly .living-composer-content {
            font-family: 'Source Sans Pro', sans-serif;
            line-height: 1.8;
        }
        
        .living-composer.mode-minimal {
            --composer-hue: 0;
            --composer-sat: 0%;
        }
        
        .living-composer.mode-minimal .living-composer-content {
            font-family: 'Inter', sans-serif;
            font-size: 0.95rem;
        }
        
        /* Mode Selection Dropdown */
        .living-composer-mode-select {
            padding: 4px 8px;
            background: rgba(255, 255, 255, 0.05);
            border: 1px solid rgba(255, 255, 255, 0.1);
            border-radius: 6px;
            color: var(--text-secondary);
            font-size: 0.75rem;
            cursor: pointer;
            transition: all 0.2s ease;
        }
        
        .living-composer-mode-select:hover {
            border-color: var(--gold-primary);
        }
        
        .living-composer-mode-select:focus {
            outline: none;
            border-color: var(--gold-primary);
        }
        
        /* Accent bar at top */
        .living-composer::before {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            right: 0;
            height: 3px;
            background: linear-gradient(90deg, 
                hsl(var(--composer-hue), var(--composer-sat), 30%) 0%,
                var(--composer-accent) 50%,
                hsl(var(--composer-hue), var(--composer-sat), 30%) 100%);
            z-index: 2;
            transition: all 0.5s ease;
        }

        /* ===== ACCESS KEYS MODAL ===== */
        .keys-stats {
            display: grid;
            grid-template-columns: repeat(5, 1fr);
            gap: 1rem;
            padding: 1.25rem 1.5rem;
            background: var(--bg-deep);
            border-bottom: 1px solid var(--border-subtle);
        }
        .keys-stat {
            text-align: center;
            padding: 0.75rem;
            background: var(--bg-card);
            border-radius: 8px;
            border: 1px solid var(--border-subtle);
        }
        .keys-stat.highlight {
            border-color: var(--gold-primary);
            background: rgba(212, 175, 55, 0.1);
        }
        .keys-stat-value {
            font-size: 1.75rem;
            font-weight: 700;
            color: var(--text-primary);
        }
        .keys-stat.highlight .keys-stat-value {
            color: var(--gold-primary);
        }
        .keys-stat-label {
            font-size: 0.75rem;
            color: var(--text-muted);
            margin-top: 0.25rem;
        }
        .keys-toolbar {
            display: flex;
            align-items: center;
            justify-content: space-between;
            padding: 1rem 1.5rem;
            background: var(--bg-card);
            border-bottom: 1px solid var(--border-subtle);
            gap: 1rem;
        }
        .keys-filters {
            display: flex;
            gap: 0.75rem;
            flex: 1;
        }
        .keys-filters select,
        .keys-filters input {
            padding: 0.5rem 0.75rem;
            background: var(--bg-deep);
            border: 1px solid var(--border-subtle);
            border-radius: 6px;
            color: var(--text-primary);
            font-size: 0.85rem;
        }
        .keys-filters input {
            flex: 1;
            max-width: 250px;
        }
        .keys-actions {
            display: flex;
            gap: 0.75rem;
        }
        .keys-list-header {
            display: grid;
            grid-template-columns: 40px 1fr 100px 180px 100px 120px;
            gap: 1rem;
            padding: 0.75rem 1.5rem;
            background: var(--bg-deep);
            border-bottom: 1px solid var(--border-subtle);
            font-size: 0.75rem;
            font-weight: 600;
            color: var(--text-muted);
            text-transform: uppercase;
            letter-spacing: 0.5px;
        }
        .keys-checkbox input {
            width: 16px;
            height: 16px;
            cursor: pointer;
            accent-color: var(--gold-primary);
        }
        .keys-list {
            flex: 1;
            overflow-y: auto;
            padding: 0.5rem 0;
        }
        .keys-loading {
            text-align: center;
            padding: 3rem;
            color: var(--text-muted);
        }
        .keys-row {
            display: grid;
            grid-template-columns: 40px 1fr 100px 180px 100px 120px;
            gap: 1rem;
            padding: 0.75rem 1.5rem;
            align-items: center;
            border-bottom: 1px solid var(--border-subtle);
            transition: background 0.15s ease;
        }
        .keys-row:hover {
            background: rgba(212, 175, 55, 0.05);
        }
        .keys-row.selected {
            background: rgba(212, 175, 55, 0.1);
        }
        .keys-org-name {
            font-weight: 500;
            color: var(--text-primary);
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
        }
        .keys-org-email {
            font-size: 0.75rem;
            color: var(--text-muted);
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
        }
        .keys-type {
            font-size: 0.75rem;
            padding: 0.25rem 0.5rem;
            border-radius: 4px;
            text-align: center;
        }
        .keys-type.university {
            background: rgba(59, 130, 246, 0.2);
            color: #60a5fa;
        }
        .keys-type.media {
            background: rgba(168, 85, 247, 0.2);
            color: #c084fc;
        }
        .keys-key {
            font-family: 'Courier New', monospace;
            font-size: 0.8rem;
            color: var(--gold-primary);
            background: var(--bg-deep);
            padding: 0.35rem 0.5rem;
            border-radius: 4px;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
        }
        .keys-key.empty {
            color: var(--text-muted);
            font-style: italic;
            font-family: inherit;
        }
        .keys-status {
            font-size: 0.75rem;
            padding: 0.25rem 0.5rem;
            border-radius: 4px;
            text-align: center;
        }
        .keys-status.no_key {
            background: rgba(107, 114, 128, 0.2);
            color: #9ca3af;
        }
        .keys-status.pending {
            background: rgba(234, 179, 8, 0.2);
            color: #fbbf24;
        }
        .keys-status.sent {
            background: rgba(59, 130, 246, 0.2);
            color: #60a5fa;
        }
        .keys-status.used {
            background: rgba(34, 197, 94, 0.2);
            color: #4ade80;
        }
        .keys-row-actions {
            display: flex;
            gap: 0.5rem;
        }
        .keys-action-btn {
            padding: 0.35rem 0.5rem;
            background: var(--bg-deep);
            border: 1px solid var(--border-subtle);
            border-radius: 4px;
            color: var(--text-muted);
            cursor: pointer;
            font-size: 0.7rem;
            transition: all 0.15s ease;
        }
        .keys-action-btn:hover {
            border-color: var(--gold-primary);
            color: var(--gold-primary);
        }
        .keys-action-btn.primary {
            background: var(--gold-primary);
            border-color: var(--gold-primary);
            color: var(--bg-deep);
        }
        .keys-action-btn.primary:hover {
            background: var(--gold-hover);
        }
        .keys-action-btn:disabled {
            opacity: 0.5;
            cursor: not-allowed;
        }
        
        /* Bulk Send Modal */
        .bulk-send-content {
            padding: 1.5rem;
        }
        .bulk-send-summary {
            background: var(--bg-deep);
            border-radius: 8px;
            padding: 1rem;
            margin-bottom: 1.5rem;
            text-align: center;
        }
        .bulk-send-count {
            font-size: 1.5rem;
            font-weight: 600;
            color: var(--gold-primary);
            margin-bottom: 0.5rem;
        }
        .bulk-send-breakdown {
            font-size: 0.85rem;
            color: var(--text-muted);
        }
        .bulk-send-warning {
            display: flex;
            align-items: center;
            gap: 0.5rem;
            padding: 0.75rem 1rem;
            background: rgba(234, 179, 8, 0.1);
            border: 1px solid rgba(234, 179, 8, 0.3);
            border-radius: 6px;
            color: #fbbf24;
            font-size: 0.85rem;
            margin-top: 1rem;
        }
        
        /* Import Modal Styles */
        .import-tabs {
            display: flex;
            gap: 0.5rem;
            margin-bottom: 1rem;
            border-bottom: 1px solid var(--border-subtle);
            padding-bottom: 0.5rem;
        }
        .import-tab {
            padding: 0.5rem 1rem;
            background: transparent;
            border: 1px solid var(--border-subtle);
            border-radius: 6px;
            color: var(--text-muted);
            cursor: pointer;
            font-size: 0.85rem;
            transition: all 0.2s ease;
        }
        .import-tab:hover {
            border-color: var(--gold-primary);
            color: var(--gold-primary);
        }
        .import-tab.active {
            background: var(--gold-primary);
            border-color: var(--gold-primary);
            color: var(--bg-deep);
        }
        .import-dropzone {
            border: 2px dashed var(--border-subtle);
            border-radius: 10px;
            padding: 2rem;
            text-align: center;
            cursor: pointer;
            transition: all 0.2s ease;
            color: var(--text-muted);
        }
        .import-dropzone:hover {
            border-color: var(--gold-primary);
            background: rgba(212, 175, 55, 0.05);
        }
        .import-dropzone.dragover {
            border-color: var(--gold-primary);
            background: rgba(212, 175, 55, 0.1);
        }
        .import-dropzone svg {
            margin-bottom: 0.5rem;
            opacity: 0.5;
        }
        .import-dropzone p {
            margin: 0;
            font-size: 0.9rem;
        }
        
        /* ===== MEMBERS MODAL ===== */
        .members-stats {
            display: grid;
            grid-template-columns: repeat(5, 1fr);
            gap: 0.75rem;
            padding: 1rem 1.5rem;
            background: var(--bg-deep);
            border-bottom: 1px solid var(--border-subtle);
        }
        .members-stat {
            text-align: center;
            padding: 0.6rem;
            background: var(--bg-card);
            border-radius: 8px;
            border: 1px solid var(--border-subtle);
        }
        .members-stat-value {
            font-size: 1.5rem;
            font-weight: 700;
            color: var(--text-primary);
        }
        .members-stat-label {
            font-size: 0.7rem;
            color: var(--text-muted);
            text-transform: uppercase;
            letter-spacing: 0.5px;
        }
        .members-stat.tier-free { border-color: #6b7280; }
        .members-stat.tier-free .members-stat-value { color: #9ca3af; }
        .members-stat.tier-paid { border-color: var(--gold-primary); }
        .members-stat.tier-paid .members-stat-value { color: var(--gold-primary); }
        .members-stat.tier-active { border-color: #22c55e; }
        .members-stat.tier-active .members-stat-value { color: #4ade80; }
        .members-stat.tier-pending { border-color: #f59e0b; }
        .members-stat.tier-pending .members-stat-value { color: #fbbf24; }
        
        .platform-stats {
            display: flex;
            gap: 1rem;
            padding: 0.75rem 1.5rem;
            background: var(--bg-card);
            border-bottom: 1px solid var(--border-subtle);
            justify-content: center;
        }
        .platform-stat {
            display: flex;
            align-items: center;
            gap: 0.5rem;
            padding: 0.5rem 1rem;
            background: var(--bg-deep);
            border-radius: 20px;
            font-size: 0.8rem;
        }
        .platform-icon { font-size: 1rem; }
        .platform-name { color: var(--text-muted); }
        .platform-count { 
            font-weight: 600; 
            color: var(--gold-primary);
            background: rgba(212, 175, 55, 0.2);
            padding: 0.15rem 0.5rem;
            border-radius: 10px;
            font-size: 0.75rem;
        }
        
        /* Key Status Row */
        .key-status-row {
            display: flex;
            align-items: center;
            gap: 1.5rem;
            padding: 0.6rem 1.5rem;
            background: var(--bg-deep);
            border-bottom: 1px solid var(--border-subtle);
            font-size: 0.75rem;
        }
        .key-status-item {
            display: flex;
            align-items: center;
            gap: 0.4rem;
        }
        .key-status-label {
            color: var(--text-muted);
        }
        .key-status-value {
            font-weight: 600;
            padding: 0.1rem 0.4rem;
            border-radius: 4px;
        }
        .key-status-value.pending { background: rgba(234, 179, 8, 0.2); color: #fbbf24; }
        .key-status-value.sent { background: rgba(59, 130, 246, 0.2); color: #60a5fa; }
        .key-status-value.activated { background: rgba(34, 197, 94, 0.2); color: #4ade80; }
        .key-status-value.source { background: rgba(139, 92, 246, 0.2); color: #a78bfa; }
        .key-status-divider {
            width: 1px;
            height: 20px;
            background: var(--border-subtle);
        }
        
        .members-list-header {
            display: grid;
            grid-template-columns: 40px 1.5fr 100px 180px 160px 80px 100px;
            gap: 0.75rem;
            padding: 0.6rem 1.5rem;
            background: var(--bg-deep);
            border-bottom: 1px solid var(--border-subtle);
            font-size: 0.7rem;
            font-weight: 600;
            color: var(--text-muted);
            text-transform: uppercase;
            letter-spacing: 0.5px;
        }
        .members-list {
            flex: 1;
            overflow-y: auto;
            padding: 0.5rem 0;
        }
        .member-row {
            display: grid;
            grid-template-columns: 40px 1.5fr 100px 180px 160px 80px 100px;
            gap: 0.75rem;
            padding: 0.6rem 1.5rem;
            align-items: center;
            border-bottom: 1px solid var(--border-subtle);
            transition: background 0.15s ease;
        }
        .member-row:hover {
            background: rgba(212, 175, 55, 0.05);
        }
        .member-row.selected {
            background: rgba(212, 175, 55, 0.1);
        }
        .member-info {
            min-width: 0;
        }
        .member-name {
            font-weight: 500;
            color: var(--text-primary);
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
        }
        .member-email {
            font-size: 0.75rem;
            color: var(--text-muted);
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
        }
        .member-tier {
            font-size: 0.75rem;
            padding: 0.2rem 0.5rem;
            border-radius: 4px;
            text-align: center;
            font-weight: 500;
        }
        .member-tier.free { background: rgba(107, 114, 128, 0.2); color: #9ca3af; }
        .member-tier.paid { background: rgba(212, 175, 55, 0.2); color: var(--gold-primary); }
        .member-tier.active { background: rgba(34, 197, 94, 0.2); color: #4ade80; }
        .member-tier.pending { background: rgba(245, 158, 11, 0.2); color: #fbbf24; }
        
        .member-platforms {
            display: flex;
            gap: 0.25rem;
            flex-wrap: wrap;
        }
        .member-platform {
            font-size: 0.9rem;
            opacity: 0.3;
        }
        .member-platform.active {
            opacity: 1;
        }
        
        .member-key {
            font-family: 'Courier New', monospace;
            font-size: 0.7rem;
            color: var(--gold-primary);
            background: var(--bg-deep);
            padding: 0.25rem 0.4rem;
            border-radius: 4px;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
        }
        
        .member-status {
            font-size: 0.7rem;
            padding: 0.2rem 0.4rem;
            border-radius: 4px;
            text-align: center;
        }
        .member-status.active { background: rgba(34, 197, 94, 0.2); color: #4ade80; }
        .member-status.pending { background: rgba(234, 179, 8, 0.2); color: #fbbf24; }
        .member-status.suspended { background: rgba(239, 68, 68, 0.2); color: #f87171; }
        
        .platform-checkboxes {
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 0.5rem;
        }
        .platform-checkbox {
            display: flex;
            align-items: center;
            gap: 0.5rem;
            padding: 0.5rem 0.75rem;
            background: var(--bg-deep);
            border-radius: 6px;
            cursor: pointer;
            transition: all 0.15s ease;
        }
        .platform-checkbox:hover {
            background: rgba(212, 175, 55, 0.1);
        }
        .platform-checkbox input {
            accent-color: var(--gold-primary);
        }

        /* Responsive */
        @media (max-width: 1200px) {
            .app-container { grid-template-columns: 220px 1fr; }
        }

        @media (max-width: 900px) {
            .app-container { grid-template-columns: 1fr; }
            .sidebar { display: none; }
        }

        /* ===== DOCUMENT STUDIO STYLES ===== */
        .document-studio-modal {
            position: fixed;
            inset: 0;
            background: rgba(0, 0, 0, 0.8);
            z-index: 10000;
            display: flex;
            align-items: center;
            justify-content: center;
            opacity: 0;
            visibility: hidden;
            transition: all 0.3s ease;
        }
        .document-studio-modal.active {
            opacity: 1;
            visibility: visible;
        }
        .document-studio-container {
            width: 95vw;
            max-width: 1400px;
            height: 90vh;
            background: linear-gradient(180deg, #0d0e14 0%, #12131a 100%);
            border: 1px solid var(--border-color);
            border-radius: 12px;
            display: flex;
            flex-direction: column;
            overflow: hidden;
            transform: scale(0.95);
            transition: transform 0.3s ease;
        }
        .document-studio-modal.active .document-studio-container {
            transform: scale(1);
        }
        .doc-studio-header {
            padding: 1rem 1.5rem;
            border-bottom: 1px solid var(--border-color);
            display: flex;
            align-items: center;
            justify-content: space-between;
            background: linear-gradient(180deg, rgba(212, 175, 55, 0.03) 0%, transparent 100%);
        }
        .doc-studio-title {
            display: flex;
            align-items: center;
            gap: 0.75rem;
            font-family: 'Space Grotesk', sans-serif;
            font-size: 1rem;
            color: var(--gold-primary);
            letter-spacing: 0.1em;
        }
        .doc-studio-title svg {
            width: 24px;
            height: 24px;
        }
        .doc-studio-close {
            width: 36px;
            height: 36px;
            border: 1px solid var(--border-color);
            border-radius: 8px;
            background: transparent;
            color: var(--text-muted);
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            transition: all 0.2s ease;
        }
        .doc-studio-close:hover {
            border-color: #e74c3c;
            color: #e74c3c;
        }
        .doc-studio-body {
            flex: 1;
            display: grid;
            grid-template-columns: 280px 1fr 320px;
            overflow: hidden;
        }
        .doc-studio-sidebar {
            border-right: 1px solid var(--border-color);
            display: flex;
            flex-direction: column;
            background: rgba(0, 0, 0, 0.2);
        }
        .doc-upload-zone {
            margin: 1rem;
            padding: 1.5rem;
            border: 2px dashed var(--border-color);
            border-radius: 10px;
            text-align: center;
            cursor: pointer;
            transition: all 0.3s ease;
        }
        .doc-upload-zone:hover,
        .doc-upload-zone.dragover {
            border-color: var(--gold-primary);
            background: rgba(212, 175, 55, 0.05);
        }
        .doc-upload-zone svg {
            width: 32px;
            height: 32px;
            color: var(--gold-primary);
            opacity: 0.5;
            margin-bottom: 0.5rem;
        }
        .doc-upload-text {
            font-size: 0.8rem;
            color: var(--text-muted);
        }
        .doc-upload-hint {
            font-size: 0.7rem;
            color: var(--text-muted);
            opacity: 0.6;
            margin-top: 0.25rem;
        }
        .doc-list {
            flex: 1;
            overflow-y: auto;
            padding: 0 1rem 1rem;
        }
        .doc-list-item {
            display: flex;
            align-items: center;
            gap: 0.75rem;
            padding: 0.75rem;
            background: rgba(255, 255, 255, 0.02);
            border: 1px solid var(--border-color);
            border-radius: 8px;
            margin-bottom: 0.5rem;
            cursor: pointer;
            transition: all 0.2s ease;
        }
        .doc-list-item:hover {
            background: rgba(212, 175, 55, 0.05);
            border-color: rgba(212, 175, 55, 0.3);
        }
        .doc-list-item.active {
            background: rgba(212, 175, 55, 0.1);
            border-color: var(--gold-primary);
        }
        .doc-list-icon { font-size: 1.25rem; }
        .doc-list-info { flex: 1; min-width: 0; }
        .doc-list-name {
            font-size: 0.8rem;
            color: var(--text-primary);
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
        }
        .doc-list-meta {
            font-size: 0.65rem;
            color: var(--text-muted);
            margin-top: 0.15rem;
        }
        .doc-editor-area {
            display: flex;
            flex-direction: column;
            overflow: hidden;
        }
        .doc-title-bar {
            padding: 0.75rem 1.25rem;
            border-bottom: 1px solid var(--border-color);
            display: flex;
            align-items: center;
            gap: 1rem;
        }
        .doc-title-input {
            flex: 1;
            background: transparent;
            border: none;
            font-family: 'Space Grotesk', sans-serif;
            font-size: 1rem;
            color: var(--text-primary);
            outline: none;
        }
        .doc-status {
            display: flex;
            align-items: center;
            gap: 0.5rem;
            font-size: 0.7rem;
            color: var(--text-muted);
        }
        .doc-status-dot {
            width: 6px;
            height: 6px;
            border-radius: 50%;
            background: #4ade80;
        }
        .doc-status-dot.modified {
            background: var(--gold-primary);
            animation: docPulse 2s ease-in-out infinite;
        }
        @keyframes docPulse {
            0%, 100% { opacity: 1; }
            50% { opacity: 0.5; }
        }
        .doc-toolbar {
            padding: 0.5rem 1rem;
            border-bottom: 1px solid var(--border-color);
            display: flex;
            align-items: center;
            gap: 0.25rem;
            flex-wrap: wrap;
            background: rgba(0, 0, 0, 0.2);
        }
        .doc-toolbar-btn {
            width: 32px;
            height: 32px;
            border: none;
            border-radius: 6px;
            background: transparent;
            color: var(--text-muted);
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            transition: all 0.2s ease;
        }
        .doc-toolbar-btn:hover {
            background: rgba(255, 255, 255, 0.05);
            color: var(--text-primary);
        }
        .doc-toolbar-btn.active {
            background: rgba(212, 175, 55, 0.15);
            color: var(--gold-primary);
        }
        .doc-toolbar-select {
            height: 32px;
            padding: 0 0.75rem;
            background: var(--bg-card);
            border: 1px solid var(--border-color);
            border-radius: 6px;
            color: var(--text-primary);
            font-size: 0.75rem;
            cursor: pointer;
        }
        .toolbar-divider {
            width: 1px;
            height: 24px;
            background: var(--border-color);
            margin: 0 0.5rem;
        }
        .doc-editor-canvas {
            flex: 1;
            overflow-y: auto;
            padding: 2rem;
            position: relative;
            display: flex;
            flex-direction: column;
            align-items: center;
            transition: background 0.8s ease;
        }
        
        /* ===== LIVING DOCUMENT SYSTEM ===== */
        
        /* CSS Variables for Dynamic Theming */
        .doc-editor-canvas {
            --living-hue: 220;
            --living-sat: 50%;
            --living-primary: hsl(var(--living-hue), var(--living-sat), 20%);
            --living-secondary: hsl(var(--living-hue), var(--living-sat), 30%);
            --living-accent: hsl(calc(var(--living-hue) + 30), 70%, 50%);
            --living-accent-glow: hsl(calc(var(--living-hue) + 30), 70%, 60%);
            --living-bg: hsl(var(--living-hue), 20%, 99%);
            --living-bg-alt: hsl(var(--living-hue), 30%, 96%);
            --living-text: hsl(var(--living-hue), 10%, 20%);
            --living-text-light: hsl(var(--living-hue), 10%, 45%);
            --living-border: hsl(var(--living-hue), 20%, 88%);
            --living-font-display: 'Space Grotesk', 'Inter', sans-serif;
            --living-font-body: 'Inter', sans-serif;
            --living-transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
            background: linear-gradient(180deg, #2d2d35 0%, #1f1f25 100%);
        }
        
        /* Ambient Background Orbs */
        .doc-ambient-bg {
            position: absolute;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            pointer-events: none;
            overflow: hidden;
            z-index: 0;
        }
        
        .ambient-orb {
            position: absolute;
            border-radius: 50%;
            filter: blur(60px);
            opacity: 0.12;
            transition: var(--living-transition);
        }
        
        .orb-1 {
            width: 400px;
            height: 400px;
            background: var(--living-accent);
            top: -100px;
            right: -100px;
            animation: floatOrb1 20s ease-in-out infinite;
        }
        
        .orb-2 {
            width: 300px;
            height: 300px;
            background: var(--living-primary);
            bottom: -50px;
            left: -50px;
            animation: floatOrb2 25s ease-in-out infinite;
        }
        
        .orb-3 {
            width: 200px;
            height: 200px;
            background: var(--living-accent-glow);
            top: 50%;
            left: 30%;
            animation: floatOrb3 30s ease-in-out infinite;
        }
        
        @keyframes floatOrb1 {
            0%, 100% { transform: translate(0, 0) scale(1); }
            33% { transform: translate(-30px, 30px) scale(1.1); }
            66% { transform: translate(20px, -20px) scale(0.9); }
        }
        
        @keyframes floatOrb2 {
            0%, 100% { transform: translate(0, 0) scale(1); }
            50% { transform: translate(50px, -30px) scale(1.15); }
        }
        
        @keyframes floatOrb3 {
            0%, 100% { transform: translate(0, 0) scale(1); opacity: 0.08; }
            50% { transform: translate(30px, -20px) scale(1.2); opacity: 0.15; }
        }
        
        /* Mode Indicator Bar */
        .doc-mode-bar {
            position: absolute;
            top: 10px;
            left: 50%;
            transform: translateX(-50%);
            display: flex;
            align-items: center;
            gap: 12px;
            background: rgba(0, 0, 0, 0.6);
            backdrop-filter: blur(10px);
            padding: 8px 16px;
            border-radius: 20px;
            z-index: 10;
            border: 1px solid rgba(255, 255, 255, 0.1);
        }
        
        .mode-indicator-dot {
            width: 8px;
            height: 8px;
            border-radius: 50%;
            background: var(--living-accent);
            animation: modePulse 2s ease-in-out infinite;
        }
        
        @keyframes modePulse {
            0%, 100% { opacity: 1; transform: scale(1); }
            50% { opacity: 0.5; transform: scale(0.8); }
        }
        
        .mode-indicator-text {
            font-family: 'Inter', sans-serif;
            font-size: 11px;
            color: var(--living-accent);
            text-transform: uppercase;
            letter-spacing: 2px;
            font-weight: 600;
        }
        
        .mood-bar {
            display: flex;
            gap: 3px;
            margin-left: 8px;
            padding-left: 12px;
            border-left: 1px solid rgba(255, 255, 255, 0.15);
        }
        
        .mood-segment {
            width: 4px;
            height: 14px;
            background: rgba(255, 255, 255, 0.15);
            border-radius: 2px;
            transition: all 0.3s ease;
        }
        
        .mood-segment.active {
            background: var(--living-accent);
        }
        
        /* ===== DOCUMENT PAGE - LIVING VERSION ===== */
        .doc-page {
            width: 8.5in;
            min-height: 11in;
            background: var(--living-bg);
            position: relative;
            z-index: 1;
            margin-top: 50px;
            margin-bottom: 1.5rem;
            transition: var(--living-transition);
            transform-origin: top center;
        }
        
        /* Dynamic shadow based on mode */
        .doc-page::after {
            content: '';
            position: absolute;
            top: 8px;
            left: 8px;
            right: -8px;
            bottom: -8px;
            background: rgba(0, 0, 0, 0.15);
            z-index: -1;
            border-radius: 2px;
            transition: var(--living-transition);
        }
        
        .doc-page {
            box-shadow: 
                0 20px 60px rgba(0, 0, 0, 0.3),
                0 8px 25px rgba(0, 0, 0, 0.2);
        }
        
        /* Top Decoration Bar - Animated */
        .doc-decoration-bar {
            position: absolute;
            top: 0;
            left: 0;
            right: 0;
            height: 5px;
            background: linear-gradient(90deg, 
                var(--living-primary) 0%, 
                var(--living-accent) 50%, 
                var(--living-primary) 100%);
            transition: var(--living-transition);
        }
        
        /* Side Accent - Shows in Technical/Legal modes */
        .doc-decoration-side {
            position: absolute;
            top: 0;
            left: 0;
            width: 4px;
            height: 100%;
            background: linear-gradient(180deg,
                var(--living-accent) 0%,
                var(--living-accent-glow) 50%,
                var(--living-accent) 100%);
            opacity: 0;
            transition: var(--living-transition);
        }
        
        /* Corner Decorations - Shows in Creative/Elegant modes */
        .doc-decoration-corner {
            position: absolute;
            width: 60px;
            height: 60px;
            opacity: 0;
            transition: var(--living-transition);
            pointer-events: none;
        }
        
        .doc-decoration-corner.top-right {
            top: 15px;
            right: 15px;
        }
        
        .doc-decoration-corner.bottom-left {
            bottom: 60px;
            left: 15px;
            transform: rotate(180deg);
        }
        
        .doc-decoration-corner svg {
            width: 100%;
            height: 100%;
            fill: var(--living-accent);
            opacity: 0.1;
        }
        
        /* Watermark - Shows in Confidential/Draft modes */
        .doc-watermark {
            position: absolute;
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%) rotate(-45deg);
            font-family: var(--living-font-display);
            font-size: 100px;
            color: var(--living-accent);
            opacity: 0;
            white-space: nowrap;
            pointer-events: none;
            letter-spacing: 15px;
            transition: var(--living-transition);
        }
        
        /* ===== CONTENT AREA ===== */
        .doc-page-content {
            flex: 1;
            padding: 1in 1.25in 1in 1.25in;
            outline: none;
            font-family: var(--living-font-body);
            font-size: 12pt;
            line-height: 1.6;
            color: var(--living-text);
            min-height: calc(11in - 2in);
            transition: var(--living-transition);
        }
        
        .doc-page-content:focus {
            outline: none;
        }
        
        .doc-page-content:empty::before {
            content: 'Begin your story...';
            color: var(--living-text-light);
            font-style: italic;
            font-family: var(--living-font-display);
        }
        
        /* ===== DYNAMIC TYPOGRAPHY ===== */
        .doc-page-content h1 {
            font-family: var(--living-font-display);
            font-size: 28pt;
            font-weight: 600;
            color: var(--living-primary);
            margin: 0 0 0.5em 0;
            line-height: 1.2;
            letter-spacing: -0.5px;
            transition: var(--living-transition);
            position: relative;
        }
        
        .doc-page-content h1::after {
            content: '';
            position: absolute;
            bottom: -8px;
            left: 0;
            width: 50px;
            height: 3px;
            background: var(--living-accent);
            border-radius: 2px;
            transition: var(--living-transition);
        }
        
        .doc-page-content h2 {
            font-family: var(--living-font-display);
            font-size: 18pt;
            font-weight: 600;
            color: var(--living-primary);
            margin: 1.5em 0 0.5em 0;
            line-height: 1.3;
            padding-bottom: 0.3em;
            border-bottom: 2px solid var(--living-accent);
            transition: var(--living-transition);
        }
        
        .doc-page-content h3 {
            font-family: var(--living-font-display);
            font-size: 14pt;
            font-weight: 600;
            color: var(--living-secondary);
            margin: 1.25em 0 0.5em 0;
            transition: var(--living-transition);
        }
        
        .doc-page-content h4 {
            font-family: var(--living-font-body);
            font-size: 12pt;
            font-weight: 600;
            color: var(--living-text);
            margin: 1em 0 0.5em 0;
            text-transform: uppercase;
            letter-spacing: 1px;
            transition: var(--living-transition);
        }
        
        .doc-page-content p {
            margin: 0 0 1em 0;
            transition: var(--living-transition);
        }
        
        .doc-page-content ul, .doc-page-content ol {
            margin: 1em 0;
            padding-left: 1.5em;
        }
        
        .doc-page-content li {
            margin-bottom: 0.5em;
        }
        
        .doc-page-content li::marker {
            color: var(--living-accent);
        }
        
        .doc-page-content blockquote {
            position: relative;
            border: none;
            padding: 1em 1.5em 1em 2em;
            margin: 1.5em 0;
            background: linear-gradient(135deg, var(--living-bg-alt) 0%, var(--living-bg) 100%);
            border-radius: 0 10px 10px 0;
            font-style: italic;
            color: var(--living-text-light);
            transition: var(--living-transition);
        }
        
        .doc-page-content blockquote::before {
            content: '';
            position: absolute;
            left: 0;
            top: 0;
            bottom: 0;
            width: 4px;
            background: linear-gradient(180deg, var(--living-accent), var(--living-accent-glow));
            border-radius: 4px;
        }
        
        .doc-page-content blockquote::after {
            content: '"';
            position: absolute;
            top: -5px;
            left: 12px;
            font-family: var(--living-font-display);
            font-size: 50px;
            color: var(--living-accent);
            opacity: 0.15;
            font-style: normal;
        }
        
        .doc-page-content table {
            width: 100%;
            border-collapse: separate;
            border-spacing: 0;
            margin: 1.5em 0;
            border-radius: 8px;
            overflow: hidden;
            box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
        }
        
        .doc-page-content th, .doc-page-content td {
            padding: 10px 14px;
            text-align: left;
            border-bottom: 1px solid var(--living-border);
        }
        
        .doc-page-content th {
            background: var(--living-primary);
            color: white;
            font-weight: 600;
            text-transform: uppercase;
            font-size: 9pt;
            letter-spacing: 0.5px;
        }
        
        .doc-page-content tr:last-child td {
            border-bottom: none;
        }
        
        .doc-page-content tr:nth-child(even) td {
            background: var(--living-bg-alt);
        }
        
        .doc-page-content pre {
            font-family: 'JetBrains Mono', 'Consolas', monospace;
            background: linear-gradient(135deg, #1e1e2e 0%, #2d2d3d 100%);
            color: #e0e0e0;
            padding: 1.25em;
            border-radius: 10px;
            margin: 1.5em 0;
            font-size: 10pt;
            line-height: 1.5;
            overflow-x: auto;
            position: relative;
            box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.2);
        }
        
        .doc-page-content pre::before {
            content: '';
            position: absolute;
            top: 10px;
            left: 12px;
            width: 10px;
            height: 10px;
            background: #ff5f56;
            border-radius: 50%;
            box-shadow: 16px 0 0 #ffbd2e, 32px 0 0 #27ca40;
        }
        
        .doc-page-content code {
            font-family: 'JetBrains Mono', 'Consolas', monospace;
            background: var(--living-bg-alt);
            padding: 0.15em 0.4em;
            border-radius: 4px;
            font-size: 0.9em;
            color: var(--living-accent);
        }
        
        .doc-page-content hr {
            border: none;
            height: 1px;
            background: linear-gradient(90deg, transparent, var(--living-accent), transparent);
            margin: 2em 0;
            position: relative;
        }
        
        .doc-page-content hr::after {
            content: '\25C6';
            position: absolute;
            left: 50%;
            top: 50%;
            transform: translate(-50%, -50%);
            background: var(--living-bg);
            padding: 0 12px;
            color: var(--living-accent);
            font-size: 10px;
        }
        
        .doc-page-content a {
            color: var(--living-accent);
            text-decoration: none;
            border-bottom: 1px solid transparent;
            transition: all 0.2s ease;
        }
        
        .doc-page-content a:hover {
            border-bottom-color: var(--living-accent);
        }
        
        .doc-page-content img {
            max-width: 100%;
            height: auto;
            border-radius: 6px;
            margin: 1.5em 0;
            box-shadow: 0 8px 30px rgba(0, 0, 0, 0.1);
        }
        
        .doc-page-content strong, .doc-page-content b {
            font-weight: 700;
            color: var(--living-primary);
        }
        
        .doc-page-content em, .doc-page-content i {
            font-style: italic;
        }
        
        .doc-page-content u {
            text-decoration: none;
            background: linear-gradient(to bottom, transparent 60%, var(--living-accent-glow) 60%);
            background-size: 100% 90%;
            background-repeat: no-repeat;
        }
        
        .doc-page-content s, .doc-page-content strike {
            text-decoration: line-through;
            opacity: 0.6;
        }
        
        .doc-page-content sup {
            vertical-align: super;
            font-size: 0.8em;
        }
        
        .doc-page-content sub {
            vertical-align: sub;
            font-size: 0.8em;
        }
        
        .doc-page-content ::selection {
            background: rgba(var(--living-accent), 0.3);
        }
        
        /* ===== DOCUMENT FOOTER ===== */
        .doc-page-footer {
            position: absolute;
            bottom: 0.5in;
            left: 1.25in;
            right: 1.25in;
            font-size: 9pt;
            color: var(--living-text-light);
            display: flex;
            justify-content: space-between;
            align-items: center;
            border-top: 1px solid var(--living-border);
            padding-top: 8px;
            transition: var(--living-transition);
        }
        
        .doc-page-footer-brand {
            display: flex;
            align-items: center;
            gap: 6px;
        }
        
        .doc-page-footer-brand svg {
            width: 12px;
            height: 12px;
            fill: var(--living-accent);
        }
        
        .doc-page-number {
            position: absolute;
            bottom: 0.5in;
            left: 50%;
            transform: translateX(-50%);
            font-size: 10pt;
            color: var(--living-text-light);
        }
        
        /* ===== LIVING MODE STYLES ===== */
        
        /* PROFESSIONAL Mode */
        .living-mode-professional {
            --living-hue: 220;
            --living-sat: 50%;
            --living-font-display: 'Inter', 'Arial', sans-serif;
            --living-font-body: 'Source Sans Pro', 'Arial', sans-serif;
        }
        
        .living-mode-professional .doc-page-content h1::after {
            width: 100%;
            height: 2px;
        }
        
        .living-mode-professional .doc-decoration-bar {
            height: 4px;
        }
        
        /* CREATIVE Mode */
        .living-mode-creative {
            --living-hue: 280;
            --living-sat: 60%;
            --living-font-display: 'Playfair Display', Georgia, serif;
            --living-font-body: 'Crimson Pro', Georgia, serif;
        }
        
        .living-mode-creative .doc-page-content {
            font-size: 13pt;
            line-height: 1.8;
        }
        
        .living-mode-creative .doc-page-content h1 {
            font-style: italic;
            font-weight: 400;
            font-size: 32pt;
        }
        
        .living-mode-creative .doc-page-content h1::after {
            display: none;
        }
        
        .living-mode-creative .doc-decoration-corner {
            opacity: 0.5;
        }
        
        /* TECHNICAL Mode */
        .living-mode-technical {
            --living-hue: 180;
            --living-sat: 50%;
            --living-font-display: 'Space Grotesk', 'Inter', sans-serif;
            --living-font-body: 'Inter', sans-serif;
        }
        
        .living-mode-technical .doc-page-content {
            font-size: 11pt;
        }
        
        .living-mode-technical .doc-page-content h1 {
            font-weight: 700;
            letter-spacing: -1px;
        }
        
        .living-mode-technical .doc-page-content h2 {
            border-bottom-width: 3px;
        }
        
        .living-mode-technical .doc-decoration-side {
            opacity: 1;
        }
        
        .living-mode-technical .doc-decoration-bar {
            height: 3px;
        }
        
        /* LEGAL Mode */
        .living-mode-legal {
            --living-hue: 30;
            --living-sat: 30%;
            --living-font-display: 'Lora', Georgia, serif;
            --living-font-body: 'Lora', Georgia, serif;
        }
        
        .living-mode-legal .doc-page-content {
            font-size: 12pt;
            line-height: 2;
            text-align: justify;
        }
        
        .living-mode-legal .doc-page-content h1 {
            text-align: center;
            font-size: 16pt;
            text-transform: uppercase;
            letter-spacing: 3px;
        }
        
        .living-mode-legal .doc-page-content h1::after {
            left: 50%;
            transform: translateX(-50%);
        }
        
        .living-mode-legal .doc-page-content h2 {
            text-align: center;
            border-bottom: none;
            font-size: 14pt;
        }
        
        .living-mode-legal .doc-page-content p {
            text-indent: 0.5in;
        }
        
        .living-mode-legal .doc-decoration-bar {
            display: none;
        }
        
        .living-mode-legal .doc-decoration-side {
            opacity: 1;
            width: 2px;
            background: var(--living-primary);
        }
        
        /* BOLD Mode */
        .living-mode-bold {
            --living-hue: 0;
            --living-sat: 70%;
            --living-font-display: 'Space Grotesk', sans-serif;
            --living-font-body: 'Inter', sans-serif;
        }
        
        .living-mode-bold .doc-page-content h1 {
            font-size: 42pt;
            font-weight: 700;
            text-transform: uppercase;
            letter-spacing: -2px;
            line-height: 1;
        }
        
        .living-mode-bold .doc-page-content h1::after {
            height: 6px;
            width: 100%;
        }
        
        .living-mode-bold .doc-decoration-bar {
            height: 10px;
        }
        
        .living-mode-bold .doc-decoration-side {
            opacity: 1;
            width: 6px;
        }
        
        .living-mode-bold .doc-page-content blockquote {
            background: var(--living-primary);
            color: white;
        }
        
        .living-mode-bold .doc-page-content blockquote::before {
            background: var(--living-accent);
        }
        
        /* MINIMAL Mode */
        .living-mode-minimal {
            --living-hue: 0;
            --living-sat: 0%;
            --living-font-display: 'Inter', sans-serif;
            --living-font-body: 'Inter', sans-serif;
        }
        
        .living-mode-minimal .doc-decoration-bar {
            display: none;
        }
        
        .living-mode-minimal .doc-page-content h1 {
            font-weight: 300;
            font-size: 32pt;
        }
        
        .living-mode-minimal .doc-page-content h1::after {
            display: none;
        }
        
        .living-mode-minimal .doc-page-content h2 {
            font-weight: 300;
            border-bottom: 1px solid var(--living-border);
        }
        
        .living-mode-minimal .doc-page-content blockquote {
            background: transparent;
        }
        
        .living-mode-minimal .doc-page-content blockquote::after {
            display: none;
        }
        
        /* ELEGANT Mode */
        .living-mode-elegant {
            --living-hue: 45;
            --living-sat: 70%;
            --living-font-display: 'Playfair Display', Georgia, serif;
            --living-font-body: 'Inter', sans-serif;
        }
        
        .living-mode-elegant .doc-page-content {
            font-size: 12pt;
        }
        
        .living-mode-elegant .doc-page-content h1 {
            font-weight: 400;
        }
        
        .living-mode-elegant .doc-page-content h2 {
            font-weight: 400;
            font-style: italic;
            border-bottom: 1px solid var(--living-accent);
        }
        
        .living-mode-elegant .doc-decoration-corner {
            opacity: 0.5;
        }
        
        .living-mode-elegant .doc-watermark {
            opacity: 0.02;
        }
        
        /* ===== ZOOM CONTROLS ===== */
        .doc-zoom-controls {
            position: absolute;
            bottom: 20px;
            right: 20px;
            display: flex;
            gap: 4px;
            background: rgba(0, 0, 0, 0.7);
            backdrop-filter: blur(10px);
            padding: 8px;
            border-radius: 10px;
            z-index: 10;
            border: 1px solid rgba(255, 255, 255, 0.1);
        }
        
        .doc-zoom-btn {
            width: 32px;
            height: 32px;
            border: none;
            border-radius: 6px;
            background: rgba(255, 255, 255, 0.1);
            color: #fff;
            cursor: pointer;
            font-size: 16px;
            display: flex;
            align-items: center;
            justify-content: center;
            transition: all 0.2s ease;
        }
        
        .doc-zoom-btn:hover {
            background: rgba(255, 255, 255, 0.2);
            transform: translateY(-1px);
        }
        
        .doc-zoom-level {
            color: #fff;
            font-size: 12px;
            padding: 0 12px;
            display: flex;
            align-items: center;
            font-family: 'Inter', sans-serif;
        }
        
        /* ===== RESPONSIVE SCALING ===== */
        @media screen and (max-width: 1400px) {
            .doc-page {
                width: 7.5in;
                min-height: 9.7in;
            }
            .doc-page-content {
                padding: 0.75in 1in;
                min-height: calc(9.7in - 1.5in);
            }
        }
        
        @media screen and (max-width: 1200px) {
            .doc-page {
                width: 6.5in;
                min-height: 8.4in;
            }
            .doc-page-content {
                padding: 0.6in 0.8in;
                min-height: calc(8.4in - 1.2in);
            }
            .doc-mode-bar {
                display: none;
            }
        }
        
        .doc-ai-panel {
            border-left: 1px solid var(--border-color);
            display: flex;
            flex-direction: column;
            background: rgba(0, 0, 0, 0.2);
        }
        .doc-ai-header {
            padding: 1rem;
            border-bottom: 1px solid var(--border-color);
        }
        .doc-ai-header h4 {
            font-family: 'Space Grotesk', sans-serif;
            font-size: 0.8rem;
            color: var(--gold-primary);
            letter-spacing: 0.08em;
        }
        .doc-ai-content {
            flex: 1;
            overflow-y: auto;
            padding: 1rem;
        }
        .doc-ai-suggestion {
            padding: 0.75rem;
            background: rgba(168, 85, 247, 0.08);
            border: 1px solid rgba(168, 85, 247, 0.2);
            border-radius: 8px;
            margin-bottom: 0.75rem;
            cursor: pointer;
            transition: all 0.2s ease;
        }
        .doc-ai-suggestion:hover {
            background: rgba(168, 85, 247, 0.12);
            border-color: rgba(168, 85, 247, 0.3);
        }
        .doc-ai-suggestion-label {
            font-size: 0.6rem;
            color: #a855f7;
            text-transform: uppercase;
            letter-spacing: 0.05em;
            margin-bottom: 0.35rem;
        }
        .doc-ai-suggestion-text {
            font-size: 0.8rem;
            color: var(--text-secondary);
            line-height: 1.5;
        }
        .doc-ai-input {
            padding: 1rem;
            border-top: 1px solid var(--border-color);
        }
        .doc-ai-input input {
            width: 100%;
            padding: 0.65rem 0.85rem;
            background: var(--bg-card);
            border: 1px solid var(--border-color);
            border-radius: 8px;
            color: var(--text-primary);
            font-size: 0.8rem;
            outline: none;
        }
        .doc-ai-input input:focus {
            border-color: var(--gold-primary);
        }
        .doc-actions-bar {
            padding: 1rem 1.5rem;
            border-top: 1px solid var(--border-color);
            display: flex;
            align-items: center;
            justify-content: space-between;
            background: linear-gradient(180deg, transparent 0%, rgba(0, 0, 0, 0.3) 100%);
        }
        .doc-action-group {
            display: flex;
            align-items: center;
            gap: 0.5rem;
        }
        .doc-action-btn {
            padding: 0.6rem 1rem;
            border: 1px solid var(--border-color);
            border-radius: 8px;
            background: rgba(255, 255, 255, 0.02);
            color: var(--text-muted);
            font-size: 0.8rem;
            cursor: pointer;
            display: flex;
            align-items: center;
            gap: 0.5rem;
            transition: all 0.2s ease;
        }
        .doc-action-btn:hover {
            background: rgba(212, 175, 55, 0.1);
            border-color: var(--gold-primary);
            color: var(--gold-primary);
        }
        .doc-action-btn.primary {
            background: var(--gold-primary);
            border-color: var(--gold-primary);
            color: var(--bg-dark);
        }
        .doc-action-btn.primary:hover {
            background: #f4d47c;
        }
        .doc-action-btn svg {
            width: 14px;
            height: 14px;
        }
        .doc-processing {
            position: absolute;
            inset: 0;
            background: rgba(10, 11, 15, 0.95);
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            z-index: 100;
            opacity: 0;
            visibility: hidden;
            transition: all 0.3s ease;
        }
        .doc-processing.active {
            opacity: 1;
            visibility: visible;
        }
        .doc-processing-spinner {
            width: 40px;
            height: 40px;
            border: 3px solid var(--border-color);
            border-top-color: var(--gold-primary);
            border-radius: 50%;
            animation: docSpin 1s linear infinite;
            margin-bottom: 1rem;
        }
        @keyframes docSpin {
            to { transform: rotate(360deg); }
        }
        .doc-processing-text {
            font-family: 'Space Grotesk', sans-serif;
            font-size: 0.9rem;
            color: var(--gold-primary);
        }
        .doc-list-empty {
            text-align: center;
            padding: 2rem 1rem;
            color: var(--text-muted);
            font-size: 0.85rem;
        }
        
        /* ===== FULLSCREEN WORKSPACE PANEL OVERRIDES ===== */
        /* Contacts Hub and Grants Hub use .modal-overlay but are fullscreen workspaces,
           not centered dialogs — they need solid backgrounds instead of translucent overlays */
        #contactsHubModal.modal-overlay,
        #grantsHubModal.modal-overlay {
            background: var(--bg-primary, #0a0a0f);
            z-index: 9500;
        }
        #contactsHubModal > .modal-content,
        #grantsHubModal > .modal-content {
            background: var(--bg-primary, #0a0a0f);
            width: 100%;
            max-width: 100%;
            height: 100%;
            max-height: 100%;
            border: none;
            border-radius: 0;
        }

        /* Child modals spawned from fullscreen workspace panels must appear above them */
        #editContactModal.modal-overlay,
        #addContactModal.modal-overlay,
        #importContactsToOrgsModal.modal-overlay {
            z-index: 9600;
        }

        /* ===== CONTACTS HUB STYLES ===== */
        .contacts-hub-subtitle {
            font-size: 0.85rem;
            color: var(--text-muted);
        }
        .contacts-hub-layout {
            display: flex;
            flex: 1;
            overflow: hidden;
        }
        .contacts-sidebar {
            width: 240px;
            flex-shrink: 0;
            background: var(--bg-card);
            border-right: 1px solid var(--border-subtle);
            padding: 1rem;
            overflow-y: auto;
            display: flex;
            flex-direction: column;
            gap: 1rem;
        }
        .contacts-search input {
            width: 100%;
            padding: 0.6rem 0.75rem;
            background: var(--bg-deep);
            border: 1px solid var(--border-subtle);
            border-radius: 6px;
            color: var(--text-primary);
            font-size: 0.85rem;
        }
        .contacts-search input:focus {
            outline: none;
            border-color: var(--gold-primary);
        }
        .contacts-filter-section {
            padding-bottom: 1rem;
            border-bottom: 1px solid var(--border-subtle);
        }
        .contacts-filter-section h4 {
            margin: 0 0 0.5rem;
            font-size: 0.75rem;
            color: var(--text-muted);
            text-transform: uppercase;
            letter-spacing: 0.5px;
        }
        .contacts-filter-option {
            display: flex;
            align-items: center;
            gap: 0.5rem;
            padding: 0.35rem 0;
            font-size: 0.85rem;
            cursor: pointer;
        }
        .contacts-filter-option input { accent-color: var(--gold-primary); }
        .filter-count {
            margin-left: auto;
            font-size: 0.75rem;
            color: var(--text-muted);
            background: var(--bg-deep);
            padding: 0.1rem 0.4rem;
            border-radius: 8px;
        }
        .contacts-stats {
            display: grid;
            grid-template-columns: repeat(3, 1fr);
            gap: 0.5rem;
            margin-top: auto;
            padding-top: 1rem;
        }
        .contacts-stat {
            text-align: center;
            padding: 0.5rem;
            background: var(--bg-deep);
            border-radius: 6px;
        }
        .contacts-stat-value {
            display: block;
            font-size: 1.1rem;
            font-weight: 600;
            color: var(--gold-primary);
        }
        .contacts-stat-label {
            font-size: 0.65rem;
            color: var(--text-muted);
        }
        
        .contacts-list-panel {
            flex: 1;
            display: flex;
            flex-direction: column;
            min-width: 0;
            border-right: 1px solid var(--border-subtle);
        }
        .contacts-list-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 0.75rem 1rem;
            background: var(--bg-card);
            border-bottom: 1px solid var(--border-subtle);
        }
        .contacts-list-actions {
            display: flex;
            align-items: center;
            gap: 1rem;
        }
        .contacts-select-all {
            display: flex;
            align-items: center;
            gap: 0.5rem;
            font-size: 0.85rem;
            cursor: pointer;
        }
        .contacts-select-all input { accent-color: var(--gold-primary); }
        .contacts-bulk-actions {
            display: flex;
            gap: 0.5rem;
        }
        .contacts-sort select {
            padding: 0.4rem 0.75rem;
            background: var(--bg-deep);
            border: 1px solid var(--border-subtle);
            border-radius: 6px;
            color: var(--text-primary);
            font-size: 0.85rem;
        }
        .contacts-list {
            flex: 1;
            overflow-y: auto;
            padding: 0.5rem;
        }
        .contacts-loading {
            text-align: center;
            padding: 3rem;
            color: var(--text-muted);
        }
        
        .contact-card {
            display: flex;
            align-items: center;
            gap: 0.75rem;
            padding: 0.75rem;
            margin-bottom: 0.5rem;
            background: var(--bg-card);
            border: 1px solid var(--border-subtle);
            border-radius: 8px;
            cursor: pointer;
            transition: all 0.2s;
        }
        .contact-card:hover { border-color: rgba(212, 168, 85, 0.3); }
        .contact-card.selected { border-color: var(--gold-primary); background: rgba(212, 168, 85, 0.05); }
        .contact-card.active { border-color: #3b82f6; background: rgba(59, 130, 246, 0.1); }
        .contact-card-checkbox { flex-shrink: 0; }
        .contact-card-checkbox input { accent-color: var(--gold-primary); }
        .contact-card-avatar {
            width: 40px;
            height: 40px;
            border-radius: 50%;
            background: var(--bg-deep);
            display: flex;
            align-items: center;
            justify-content: center;
            font-weight: 600;
            font-size: 0.9rem;
            color: var(--gold-primary);
            flex-shrink: 0;
        }
        .contact-card-avatar.media { background: rgba(255, 107, 53, 0.15); color: #FF6B35; }
        .contact-card-avatar.university { background: rgba(212, 168, 83, 0.15); color: #D4A853; }
        .contact-card-avatar.government { background: rgba(34, 197, 94, 0.15); color: #22c55e; }
        .contact-card-avatar.law_firm { background: rgba(245, 158, 11, 0.15); color: #f59e0b; }
        .contact-card-avatar.corporate { background: rgba(59, 130, 246, 0.15); color: #3b82f6; }
        .contact-card-info { flex: 1; min-width: 0; }
        .contact-card-name {
            font-weight: 500;
            font-size: 0.9rem;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
        }
        .contact-card-org {
            font-size: 0.8rem;
            color: var(--text-secondary);
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
        }
        .contact-card-meta {
            display: flex;
            gap: 0.5rem;
            flex-shrink: 0;
        }
        .contact-badge {
            padding: 0.2rem 0.5rem;
            border-radius: 4px;
            font-size: 0.7rem;
            background: var(--bg-deep);
            border: 1px solid var(--border-subtle);
        }
        .contact-badge.emailed { background: rgba(59, 130, 246, 0.15); border-color: rgba(59, 130, 246, 0.3); color: #3b82f6; }
        .contact-badge.responded { background: rgba(34, 197, 94, 0.15); border-color: rgba(34, 197, 94, 0.3); color: #22c55e; }
        .contact-badge.key { background: rgba(212, 168, 85, 0.15); border-color: rgba(212, 168, 85, 0.3); color: var(--gold-primary); }
        .best-contact-badge { background: linear-gradient(135deg, #d4a853, #b8923f); color: #0a0a0f; font-size: 0.65rem; font-weight: 700; padding: 2px 6px; border-radius: 4px; margin-left: 4px; }
        .priority-score { background: rgba(255,255,255,0.08); border: 1px solid rgba(255,255,255,0.15); font-size: 0.7rem; padding: 1px 5px; border-radius: 10px; }
        .relevance-high { background: rgba(34,197,94,0.15); color: #22c55e; font-size: 0.7rem; padding: 2px 6px; border-radius: 4px; margin-left: 4px; }
        .relevance-medium { background: rgba(234,179,8,0.15); color: #eab308; font-size: 0.7rem; padding: 2px 6px; border-radius: 4px; margin-left: 4px; }
        .relevance-low { background: rgba(156,163,175,0.15); color: #9ca3af; font-size: 0.7rem; padding: 2px 6px; border-radius: 4px; margin-left: 4px; }

        .contacts-detail-panel {
            width: 400px;
            flex-shrink: 0;
            background: var(--bg-deep);
            overflow-y: auto;
        }
        .contacts-detail-empty {
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            height: 100%;
            color: var(--text-muted);
            gap: 1rem;
        }
        .contact-detail-header {
            padding: 1.5rem;
            background: var(--bg-card);
            border-bottom: 1px solid var(--border-subtle);
            text-align: center;
        }
        .contact-detail-avatar {
            width: 64px;
            height: 64px;
            border-radius: 50%;
            background: var(--bg-deep);
            display: flex;
            align-items: center;
            justify-content: center;
            font-weight: 600;
            font-size: 1.5rem;
            color: var(--gold-primary);
            margin: 0 auto 0.75rem;
        }
        .contact-detail-name {
            font-size: 1.1rem;
            font-weight: 600;
            margin-bottom: 0.25rem;
        }
        .contact-detail-org {
            font-size: 0.9rem;
            color: var(--text-secondary);
            margin-bottom: 0.5rem;
        }
        .contact-detail-type {
            display: inline-block;
            padding: 0.25rem 0.75rem;
            border-radius: 12px;
            font-size: 0.75rem;
            background: rgba(212, 168, 85, 0.15);
            color: var(--gold-primary);
        }
        .contact-detail-actions {
            display: flex;
            gap: 0.5rem;
            justify-content: center;
            margin-top: 1rem;
        }
        .contact-detail-section {
            padding: 1rem 1.5rem;
            border-bottom: 1px solid var(--border-subtle);
        }
        .contact-detail-section h4 {
            margin: 0 0 0.75rem;
            font-size: 0.8rem;
            color: var(--text-muted);
            text-transform: uppercase;
            letter-spacing: 0.5px;
        }
        .contact-detail-field {
            display: flex;
            justify-content: space-between;
            padding: 0.4rem 0;
            font-size: 0.85rem;
        }
        .contact-detail-field label { color: var(--text-muted); }
        .contact-detail-field span { color: var(--text-primary); }
        .contact-detail-field a { color: var(--gold-primary); text-decoration: none; }
        .contact-detail-field a:hover { text-decoration: underline; }
        
        .contact-timeline {
            padding: 0.5rem 0;
        }
        .timeline-item {
            display: flex;
            gap: 0.75rem;
            padding: 0.5rem 0;
            font-size: 0.85rem;
        }
        .timeline-icon {
            width: 24px;
            height: 24px;
            border-radius: 50%;
            background: var(--bg-card);
            display: flex;
            align-items: center;
            justify-content: center;
            flex-shrink: 0;
            font-size: 0.7rem;
        }
        .timeline-icon.email { background: rgba(59, 130, 246, 0.15); color: #3b82f6; }
        .timeline-icon.key { background: rgba(212, 168, 85, 0.15); color: var(--gold-primary); }
        .timeline-icon.response { background: rgba(34, 197, 94, 0.15); color: #22c55e; }
        .timeline-icon.view { background: rgba(168, 85, 247, 0.15); color: #a855f7; }
        .timeline-content { flex: 1; }
        .timeline-title { font-weight: 500; }
        .timeline-date { font-size: 0.75rem; color: var(--text-muted); }




/* ==========================================================================
   SECTION: Opportunity Intelligence & Modal Styles (from admin.html inline style block 2)
   ========================================================================== */
        /* Opportunity Intelligence Styles */
        .oi-nav {
            display: flex;
            gap: 0.25rem;
            padding: 0.75rem 1.5rem;
            background: var(--bg-card);
            border-bottom: 1px solid var(--border-subtle);
        }
        .oi-nav-item {
            display: flex;
            align-items: center;
            gap: 0.5rem;
            padding: 0.6rem 1rem;
            border-radius: 6px;
            color: var(--text-secondary);
            cursor: pointer;
            transition: all 0.2s;
            font-size: 0.9rem;
        }
        .oi-nav-item:hover { background: var(--bg-elevated); color: var(--text-primary); }
        .oi-nav-item.active { background: var(--gold-primary); color: #000; }
        .oi-nav-badge {
            background: rgba(255,255,255,0.2);
            padding: 0.1rem 0.5rem;
            border-radius: 10px;
            font-size: 0.75rem;
        }
        .oi-nav-item.active .oi-nav-badge { background: rgba(0,0,0,0.2); }
        
        .oi-tab-content { flex: 1; overflow: hidden; display: flex; flex-direction: column; }
        .oi-tab-content:not(.active) { display: none !important; }
        
        /* Pipeline Board */
        .oi-pipeline-header {
            display: flex;
            gap: 1rem;
            padding: 1rem 1.5rem;
            align-items: center;
            border-bottom: 1px solid var(--border-subtle);
        }
        .oi-search-bar {
            display: flex;
            align-items: center;
            gap: 0.5rem;
            flex: 1;
            max-width: 300px;
            padding: 0.5rem 0.75rem;
            background: var(--bg-deep);
            border: 1px solid var(--border-subtle);
            border-radius: 6px;
        }
        .oi-search-bar input {
            flex: 1;
            background: transparent;
            border: none;
            color: var(--text-primary);
            outline: none;
        }
        .oi-search-bar svg { color: var(--text-muted); }
        
        .oi-pipeline-board {
            flex: 1;
            display: flex;
            gap: 1rem;
            padding: 1rem 1.5rem;
            overflow-x: auto;
        }
        .oi-pipeline-column {
            flex: 1;
            min-width: 220px;
            max-width: 280px;
            display: flex;
            flex-direction: column;
            background: var(--bg-card);
            border-radius: 8px;
            border: 1px solid var(--border-subtle);
        }
        .oi-column-header {
            display: flex;
            align-items: center;
            gap: 0.5rem;
            padding: 0.75rem 1rem;
            font-weight: 500;
            font-size: 0.85rem;
            border-bottom: 1px solid var(--border-subtle);
        }
        .oi-column-dot {
            width: 8px;
            height: 8px;
            border-radius: 50%;
        }
        .oi-column-count {
            margin-left: auto;
            background: var(--bg-deep);
            padding: 0.1rem 0.4rem;
            border-radius: 4px;
            font-size: 0.75rem;
        }
        .oi-column-cards {
            flex: 1;
            overflow-y: auto;
            padding: 0.5rem;
        }
        
        .oi-opp-card {
            background: var(--bg-elevated);
            border: 1px solid var(--border-subtle);
            border-radius: 6px;
            padding: 0.75rem;
            margin-bottom: 0.5rem;
            cursor: pointer;
            transition: all 0.2s;
        }
        .oi-opp-card:hover {
            border-color: var(--gold-primary);
            transform: translateY(-1px);
        }
        .oi-opp-card-title {
            font-weight: 500;
            font-size: 0.85rem;
            margin-bottom: 0.25rem;
            display: -webkit-box;
            -webkit-line-clamp: 2;
            -webkit-box-orient: vertical;
            overflow: hidden;
        }
        .oi-opp-card-org {
            font-size: 0.75rem;
            color: var(--text-muted);
            margin-bottom: 0.5rem;
        }
        .oi-opp-card-footer {
            display: flex;
            justify-content: space-between;
            align-items: center;
        }
        .oi-opp-card-type {
            font-size: 0.65rem;
            padding: 0.15rem 0.4rem;
            border-radius: 3px;
            text-transform: uppercase;
            font-weight: 600;
        }
        .oi-opp-card-type.federal { background: #3b82f620; color: #60a5fa; }
        .oi-opp-card-type.state { background: #22c55e20; color: #4ade80; }
        .oi-opp-card-type.university { background: #8b5cf620; color: #a78bfa; }
        .oi-opp-card-type.enterprise { background: #f59e0b20; color: #fbbf24; }
        .oi-opp-card-deadline {
            font-size: 0.7rem;
            color: var(--text-muted);
        }
        .oi-opp-card-deadline.urgent { color: #ef4444; }
        
        /* Organizations */
        .oi-orgs-layout {
            flex: 1;
            display: flex;
            overflow: hidden;
        }
        .oi-orgs-sidebar {
            width: 320px;
            border-right: 1px solid var(--border-subtle);
            display: flex;
            flex-direction: column;
            overflow: hidden;
        }
        .oi-org-filters {
            display: flex;
            flex-wrap: wrap;
            gap: 0.25rem;
            padding: 0 1rem 1rem;
        }
        .oi-org-filter {
            padding: 0.3rem 0.6rem;
            font-size: 0.75rem;
            background: var(--bg-deep);
            border: 1px solid var(--border-subtle);
            border-radius: 4px;
            color: var(--text-secondary);
            cursor: pointer;
        }
        .oi-org-filter.active {
            background: var(--gold-primary);
            border-color: var(--gold-primary);
            color: #000;
        }
        .oi-org-list {
            flex: 1;
            overflow-y: auto;
            padding: 0 0.5rem;
        }
        .oi-org-item {
            display: flex;
            align-items: center;
            gap: 0.75rem;
            padding: 0.75rem;
            border-radius: 6px;
            cursor: pointer;
            transition: all 0.2s;
        }
        .oi-org-item:hover { background: var(--bg-elevated); }
        .oi-org-item.active { background: var(--gold-primary); color: #000; }
        .oi-org-icon {
            width: 32px;
            height: 32px;
            border-radius: 6px;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 0.9rem;
        }
        .oi-org-icon.federal { background: #3b82f630; }
        .oi-org-icon.state { background: #22c55e30; }
        .oi-org-icon.university { background: #8b5cf630; }
        .oi-org-icon.enterprise { background: #f59e0b30; }
        .oi-org-info { flex: 1; min-width: 0; }
        .oi-org-name { font-size: 0.85rem; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
        .oi-org-type { font-size: 0.7rem; color: var(--text-muted); text-transform: capitalize; }
        
        .oi-orgs-detail {
            flex: 1;
            overflow-y: auto;
            padding: 1.5rem;
        }
        
        /* Signals */
        .oi-signals-layout {
            flex: 1;
            display: grid;
            grid-template-columns: repeat(4, 1fr);
            gap: 1rem;
            padding: 1rem;
            overflow: hidden;
        }
        .oi-signals-column {
            display: flex;
            flex-direction: column;
            background: var(--bg-card);
            border-radius: 8px;
            border: 1px solid var(--border-subtle);
            overflow: hidden;
        }
        .oi-signals-header {
            display: flex;
            align-items: center;
            gap: 0.5rem;
            padding: 0.75rem 1rem;
            font-weight: 500;
            font-size: 0.85rem;
            border-bottom: 1px solid var(--border-subtle);
        }
        .oi-signal-scan {
            margin-left: auto;
            padding: 0.2rem 0.5rem;
            font-size: 0.7rem;
            background: var(--gold-primary);
            border: none;
            border-radius: 4px;
            color: #000;
            cursor: pointer;
        }
        .oi-signals-list {
            flex: 1;
            overflow-y: auto;
            padding: 0.5rem;
        }
        .oi-signal-item {
            padding: 0.6rem;
            background: var(--bg-elevated);
            border-radius: 6px;
            margin-bottom: 0.5rem;
            font-size: 0.8rem;
            cursor: pointer;
            transition: all 0.2s;
        }
        .oi-signal-item:hover { border-left: 2px solid var(--gold-primary); }
        .oi-signal-source {
            font-size: 0.65rem;
            color: var(--text-muted);
            margin-top: 0.25rem;
        }
        
        /* Capabilities */
        .oi-capabilities-layout {
            flex: 1;
            overflow-y: auto;
            padding: 1.5rem;
            max-width: 900px;
            margin: 0 auto;
        }
        .oi-cap-section { margin-bottom: 2rem; }
        .oi-cap-section h3 {
            font-family: 'Space Grotesk', sans-serif;
            font-size: 1rem;
            margin-bottom: 1rem;
            padding-bottom: 0.5rem;
            border-bottom: 1px solid var(--border-subtle);
        }
        .oi-cap-card {
            background: var(--bg-card);
            border: 1px solid var(--border-subtle);
            border-radius: 8px;
            padding: 1.25rem;
        }
        .oi-cap-field { margin-bottom: 1rem; }
        .oi-cap-field:last-child { margin-bottom: 0; }
        .oi-cap-field label {
            display: block;
            font-size: 0.8rem;
            color: var(--text-muted);
            margin-bottom: 0.4rem;
        }
        .oi-cap-field input, .oi-cap-field textarea {
            width: 100%;
            padding: 0.6rem;
            background: var(--bg-deep);
            border: 1px solid var(--border-subtle);
            border-radius: 6px;
            color: var(--text-primary);
            font-family: inherit;
        }
        .oi-cap-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
        
        .oi-cap-platforms { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
        .oi-cap-platform {
            background: var(--bg-card);
            border: 1px solid var(--border-subtle);
            border-radius: 8px;
            overflow: hidden;
        }
        .oi-cap-platform-header {
            padding: 0.75rem 1rem;
            color: white;
            display: flex;
            flex-direction: column;
        }
        .oi-cap-platform-header span { font-size: 0.75rem; opacity: 0.8; }
        .oi-cap-platform textarea {
            width: 100%;
            border: none;
            padding: 0.75rem;
            background: var(--bg-card);
            color: var(--text-primary);
            font-family: inherit;
            font-size: 0.85rem;
            resize: vertical;
        }
        
        /* Responses */
        .oi-responses-layout {
            flex: 1;
            display: flex;
            overflow: hidden;
        }
        .oi-responses-library {
            width: 320px;
            padding: 1.5rem;
            border-right: 1px solid var(--border-subtle);
            overflow-y: auto;
        }
        .oi-responses-library h3 { font-family: 'Space Grotesk', sans-serif; font-size: 1rem; margin-bottom: 0.5rem; }
        .oi-response-sections { margin-top: 1.5rem; }
        .oi-response-section {
            display: flex;
            align-items: center;
            gap: 0.75rem;
            padding: 0.75rem;
            background: var(--bg-card);
            border: 1px solid var(--border-subtle);
            border-radius: 8px;
            margin-bottom: 0.5rem;
            cursor: pointer;
            transition: all 0.2s;
        }
        .oi-response-section:hover { border-color: var(--gold-primary); }
        .oi-response-section-icon { font-size: 1.5rem; }
        .oi-response-section strong { display: block; font-size: 0.9rem; }
        .oi-response-section span { font-size: 0.75rem; color: var(--text-muted); }
        
        .oi-response-editor {
            flex: 1;
            padding: 1.5rem;
            overflow-y: auto;
        }
        
        /* Opportunity Detail */
        .opp-detail-layout {
            flex: 1;
            display: flex;
            overflow: hidden;
        }
        .opp-detail-main {
            flex: 1;
            overflow-y: auto;
            padding: 1.5rem;
        }
        .opp-detail-sidebar {
            width: 280px;
            border-left: 1px solid var(--border-subtle);
            overflow-y: auto;
            padding: 1rem;
        }
        .opp-detail-section { margin-bottom: 1.5rem; }
        .opp-detail-section h3 {
            font-size: 0.9rem;
            font-weight: 600;
            margin-bottom: 0.75rem;
            color: var(--text-secondary);
        }
        .opp-detail-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1rem; }
        .opp-detail-field label {
            display: block;
            font-size: 0.75rem;
            color: var(--text-muted);
            margin-bottom: 0.3rem;
        }
        .opp-detail-field input, .opp-detail-field select, .opp-detail-field textarea {
            width: 100%;
            padding: 0.6rem;
            background: var(--bg-deep);
            border: 1px solid var(--border-subtle);
            border-radius: 6px;
            color: var(--text-primary);
            font-family: inherit;
        }
        
        .opp-sidebar-section { margin-bottom: 1.5rem; }
        .opp-sidebar-section h4 {
            font-size: 0.8rem;
            font-weight: 600;
            margin-bottom: 0.5rem;
            color: var(--text-secondary);
        }
        .opp-score-display {
            background: var(--bg-card);
            border-radius: 8px;
            padding: 1rem;
            text-align: center;
        }
        .opp-score-value {
            display: block;
            font-size: 2rem;
            font-weight: 700;
            color: var(--gold-primary);
        }
        .opp-score-label { font-size: 0.75rem; color: var(--text-muted); }
        
        .opp-timeline-item {
            display: flex;
            gap: 0.75rem;
            padding: 0.5rem 0;
            font-size: 0.8rem;
            border-left: 2px solid var(--border-subtle);
            padding-left: 1rem;
            margin-left: 0.5rem;
        }
        .opp-timeline-date { color: var(--text-muted); white-space: nowrap; }
        
        .btn-sm { padding: 0.3rem 0.6rem; font-size: 0.75rem; }
        .btn-gold {
            background: linear-gradient(135deg, var(--gold-primary), #c9a050);
            color: #0a0a0b;
            border: none;
            font-weight: 600;
        }
        .btn-gold:hover {
            background: linear-gradient(135deg, var(--gold-hover), #d4a855);
            transform: translateY(-1px);
        }
        
        .file-upload-btn {
            display: inline-flex;
            align-items: center;
            gap: 0.5rem;
            padding: 0.5rem 1rem;
            background: var(--bg-elevated);
            border: 1px dashed var(--border-subtle);
            border-radius: 6px;
            color: var(--text-secondary);
            cursor: pointer;
            transition: all 0.2s;
        }
        .file-upload-btn:hover { border-color: var(--gold-primary); color: var(--gold-primary); }
        
        .oi-empty-state {
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            height: 100%;
            color: var(--text-muted);
        }
        .oi-empty-state svg { width: 48px; height: 48px; margin-bottom: 1rem; opacity: 0.5; }
        
        /* SAM.gov Tab Styles */
        .sam-search-layout {
            display: flex;
            height: 100%;
            gap: 1.5rem;
            padding: 1.5rem;
        }
        .sam-filters {
            width: 280px;
            flex-shrink: 0;
            background: var(--bg-card);
            border-radius: 12px;
            padding: 1.25rem;
            border: 1px solid var(--border-subtle);
            overflow-y: auto;
        }
        .sam-filter-group {
            margin-bottom: 1rem;
        }
        .sam-filter-group label {
            display: block;
            font-size: 0.75rem;
            color: var(--text-muted);
            margin-bottom: 0.4rem;
            text-transform: uppercase;
            letter-spacing: 0.5px;
        }
        .sam-filter-group input, .sam-filter-group select {
            width: 100%;
            padding: 0.6rem 0.75rem;
            background: var(--bg-deep);
            border: 1px solid var(--border-subtle);
            border-radius: 6px;
            color: var(--text-primary);
            font-size: 0.9rem;
        }
        .sam-filter-group input:focus, .sam-filter-group select:focus {
            outline: none;
            border-color: rgba(59, 130, 246, 0.5);
        }
        .sam-filter-hint {
            display: block;
            font-size: 0.7rem;
            color: var(--text-muted);
            margin-top: 0.3rem;
        }
        .sam-filter-row {
            display: flex;
            gap: 0.75rem;
        }
        .sam-filter-row .sam-filter-group { flex: 1; }
        .sam-stats {
            margin-top: 1rem;
            padding-top: 1rem;
            border-top: 1px solid var(--border-subtle);
            text-align: center;
        }
        .sam-stat-value {
            font-size: 1.5rem;
            font-weight: 600;
            color: #3b82f6;
        }
        .sam-stat-label {
            display: block;
            font-size: 0.75rem;
            color: var(--text-muted);
        }
        .sam-results {
            flex: 1;
            display: flex;
            flex-direction: column;
            min-width: 0;
        }
        .sam-results-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 1rem;
            font-family: 'Space Grotesk', sans-serif;
            font-size: 1.1rem;
        }
        .sam-results-list {
            flex: 1;
            overflow-y: auto;
            display: flex;
            flex-direction: column;
            gap: 0.75rem;
        }
        .sam-result-card {
            background: var(--bg-card);
            border: 1px solid var(--border-subtle);
            border-radius: 10px;
            padding: 1rem 1.25rem;
            transition: all 0.2s;
            cursor: pointer;
        }
        .sam-result-card:hover {
            border-color: rgba(59, 130, 246, 0.5);
            transform: translateY(-1px);
        }
        .sam-result-header {
            display: flex;
            justify-content: space-between;
            align-items: flex-start;
            gap: 1rem;
            margin-bottom: 0.5rem;
        }
        .sam-result-title {
            font-weight: 600;
            color: var(--text-primary);
            font-size: 0.95rem;
            line-height: 1.3;
        }
        .sam-result-badges {
            display: flex;
            gap: 0.5rem;
            flex-shrink: 0;
        }
        .sam-badge {
            padding: 0.2rem 0.5rem;
            border-radius: 4px;
            font-size: 0.7rem;
            font-weight: 600;
            text-transform: uppercase;
        }
        .sam-badge-naics { background: rgba(59, 130, 246, 0.2); color: #60a5fa; }
        .sam-badge-setaside { background: rgba(34, 197, 94, 0.2); color: #4ade80; }
        .sam-badge-urgent { background: rgba(239, 68, 68, 0.2); color: #f87171; }
        .sam-result-meta {
            display: flex;
            flex-wrap: wrap;
            gap: 1rem;
            font-size: 0.8rem;
            color: var(--text-secondary);
        }
        .sam-result-meta span {
            display: flex;
            align-items: center;
            gap: 0.3rem;
        }
        .sam-result-actions {
            display: flex;
            gap: 0.5rem;
            margin-top: 0.75rem;
            padding-top: 0.75rem;
            border-top: 1px solid var(--border-subtle);
        }
        .sam-result-actions button {
            padding: 0.4rem 0.75rem;
            font-size: 0.8rem;
            border-radius: 6px;
            cursor: pointer;
            transition: all 0.2s;
        }
        .sam-btn-import {
            background: linear-gradient(135deg, rgba(59,130,246,0.2), rgba(59,130,246,0.1));
            border: 1px solid rgba(59,130,246,0.3);
            color: #60a5fa;
        }
        .sam-btn-import:hover { background: rgba(59,130,246,0.3); }
        .sam-btn-view {
            background: transparent;
            border: 1px solid var(--border-subtle);
            color: var(--text-secondary);
        }
        .sam-btn-view:hover { border-color: var(--text-secondary); }
        .sam-pagination {
            display: flex;
            justify-content: center;
            gap: 0.5rem;
            padding: 1rem 0;
        }
        .sam-pagination button {
            padding: 0.5rem 1rem;
            background: var(--bg-card);
            border: 1px solid var(--border-subtle);
            border-radius: 6px;
            color: var(--text-primary);
            cursor: pointer;
        }
        .sam-pagination button:hover { border-color: var(--gold-primary); }
        .sam-pagination button:disabled { opacity: 0.5; cursor: not-allowed; }
        
        /* Intelligent Matching Styles */
        .sam-intelligent-layout {
            display: flex;
            height: 100%;
            gap: 1.5rem;
            padding: 1rem;
        }
        .sam-profile-panel {
            width: 320px;
            flex-shrink: 0;
            display: flex;
            flex-direction: column;
            gap: 1rem;
            overflow-y: auto;
        }
        .sam-profile-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
        }
        .sam-profile-header h3 {
            font-family: 'Space Grotesk', sans-serif;
            font-size: 1rem;
            margin: 0;
        }
        .sam-profile-badge {
            background: linear-gradient(135deg, rgba(34, 197, 94, 0.2), rgba(34, 197, 94, 0.1));
            border: 1px solid rgba(34, 197, 94, 0.3);
            padding: 0.25rem 0.6rem;
            border-radius: 12px;
            font-size: 0.7rem;
            color: #22c55e;
        }
        .sam-profile-section {
            background: var(--bg-card);
            border: 1px solid var(--border-subtle);
            border-radius: 10px;
            padding: 1rem;
        }
        .sam-profile-section label {
            display: block;
            font-size: 0.75rem;
            color: var(--text-muted);
            text-transform: uppercase;
            letter-spacing: 0.5px;
            margin-bottom: 0.75rem;
        }
        .sam-capability-tags {
            display: flex;
            flex-wrap: wrap;
            gap: 0.5rem;
        }
        .cap-tag {
            padding: 0.35rem 0.7rem;
            border-radius: 6px;
            font-size: 0.8rem;
            cursor: pointer;
            transition: all 0.2s;
            background: var(--bg-deep);
            border: 1px solid var(--border-subtle);
            color: var(--text-secondary);
        }
        .cap-tag:hover { border-color: var(--gold-primary); }
        .cap-tag.active {
            background: rgba(212, 168, 85, 0.15);
            border-color: rgba(212, 168, 85, 0.5);
            color: var(--gold-primary);
        }
        .sam-target-list {
            display: flex;
            flex-direction: column;
            gap: 0.4rem;
        }
        .sam-target {
            padding: 0.5rem 0.75rem;
            border-radius: 6px;
            font-size: 0.85rem;
            cursor: pointer;
            background: var(--bg-deep);
            border: 1px solid transparent;
            transition: all 0.2s;
        }
        .sam-target:hover { background: var(--bg-elevated); }
        .sam-target.active {
            background: rgba(59, 130, 246, 0.1);
            border-color: rgba(59, 130, 246, 0.3);
            color: #3b82f6;
        }
        .sam-advantages {
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 0.4rem;
        }
        .sam-advantage {
            font-size: 0.8rem;
            color: #22c55e;
            padding: 0.3rem 0;
        }
        .sam-scope-options {
            display: flex;
            flex-direction: column;
            gap: 0.5rem;
        }
        .sam-checkbox {
            display: flex;
            align-items: center;
            gap: 0.5rem;
            font-size: 0.85rem;
            cursor: pointer;
        }
        .sam-checkbox input { accent-color: var(--gold-primary); }
        .sam-search-btn {
            width: 100%;
            padding: 0.9rem 1rem;
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 0.5rem;
            font-size: 0.95rem;
        }
        .sam-search-stats {
            background: var(--bg-card);
            border: 1px solid var(--border-subtle);
            border-radius: 8px;
            padding: 0.75rem 1rem;
        }
        .sam-cache-status {
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 0.5rem 0.75rem;
            background: rgba(59, 130, 246, 0.1);
            border: 1px solid rgba(59, 130, 246, 0.3);
            border-radius: 6px;
            font-size: 0.8rem;
            color: #3b82f6;
            margin-bottom: 0.75rem;
        }
        .btn-link {
            background: none;
            border: none;
            color: var(--gold-primary);
            cursor: pointer;
            font-size: 0.8rem;
            text-decoration: underline;
        }
        .btn-link:hover { color: var(--gold-hover); }
        .sam-stat-row {
            display: flex;
            justify-content: space-between;
            padding: 0.3rem 0;
            font-size: 0.85rem;
        }
        .sam-results-panel {
            flex: 1;
            display: flex;
            flex-direction: column;
            min-width: 0;
        }
        .sam-results-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 0.75rem;
        }
        .sam-results-title h3 {
            font-family: 'Space Grotesk', sans-serif;
            font-size: 1.1rem;
            margin: 0;
        }
        .sam-results-subtitle {
            font-size: 0.8rem;
            color: var(--text-muted);
        }
        .sam-results-actions {
            display: flex;
            gap: 0.75rem;
            align-items: center;
        }
        .sam-results-actions select {
            background: var(--bg-card);
            border: 1px solid var(--border-subtle);
            border-radius: 6px;
            padding: 0.4rem 0.75rem;
            color: var(--text-primary);
            font-size: 0.85rem;
        }
        .sam-fit-legend {
            display: flex;
            gap: 1.5rem;
            font-size: 0.75rem;
            color: var(--text-muted);
            margin-bottom: 0.75rem;
            padding: 0.5rem 0;
            border-bottom: 1px solid var(--border-subtle);
        }
        .fit-indicator { margin-right: 0.3rem; }
        .fit-indicator.high { color: #22c55e; }
        .fit-indicator.medium { color: #f59e0b; }
        .fit-indicator.low { color: #ef4444; }
        .sam-results-list {
            flex: 1;
            overflow-y: auto;
            display: flex;
            flex-direction: column;
            gap: 0.75rem;
        }
        .sam-opp-card {
            background: var(--bg-card);
            border: 1px solid var(--border-subtle);
            border-radius: 12px;
            padding: 1.25rem;
            transition: all 0.2s;
        }
        .sam-opp-card:hover {
            border-color: rgba(212, 168, 85, 0.4);
            transform: translateY(-1px);
        }
        .sam-opp-card.high-fit { border-left: 3px solid #22c55e; }
        .sam-opp-card.med-fit { border-left: 3px solid #f59e0b; }
        .sam-opp-card.low-fit { border-left: 3px solid #ef4444; opacity: 0.7; }
        .sam-opp-header {
            display: flex;
            justify-content: space-between;
            align-items: flex-start;
            gap: 1rem;
            margin-bottom: 0.75rem;
        }
        .sam-opp-title {
            font-weight: 600;
            font-size: 1rem;
            line-height: 1.4;
            flex: 1;
        }
        .sam-opp-score {
            display: flex;
            flex-direction: column;
            align-items: center;
            padding: 0.5rem 0.75rem;
            border-radius: 8px;
            min-width: 60px;
        }
        .sam-opp-score.high { background: rgba(34, 197, 94, 0.15); color: #22c55e; }
        .sam-opp-score.medium { background: rgba(245, 158, 11, 0.15); color: #f59e0b; }
        .sam-opp-score.low { background: rgba(239, 68, 68, 0.15); color: #ef4444; }
        .sam-opp-score-value { font-size: 1.25rem; font-weight: 700; }
        .sam-opp-score-label { font-size: 0.65rem; text-transform: uppercase; }
        .sam-opp-agency {
            font-size: 0.85rem;
            color: var(--text-secondary);
            margin-bottom: 0.75rem;
            display: flex;
            align-items: center;
            gap: 0.4rem;
        }
        .sam-opp-tags {
            display: flex;
            flex-wrap: wrap;
            gap: 0.5rem;
            margin-bottom: 0.75rem;
        }
        .sam-opp-tag {
            padding: 0.25rem 0.6rem;
            border-radius: 4px;
            font-size: 0.75rem;
            background: var(--bg-deep);
            border: 1px solid var(--border-subtle);
        }
        .sam-opp-tag.match { background: rgba(34, 197, 94, 0.1); border-color: rgba(34, 197, 94, 0.3); color: #22c55e; }
        .sam-opp-tag.deadline { background: rgba(239, 68, 68, 0.1); border-color: rgba(239, 68, 68, 0.3); color: #ef4444; }
        .sam-opp-tag.setaside { background: rgba(59, 130, 246, 0.1); border-color: rgba(59, 130, 246, 0.3); color: #3b82f6; }
        .sam-opp-meta {
            display: flex;
            flex-wrap: wrap;
            gap: 1rem;
            font-size: 0.8rem;
            color: var(--text-muted);
            margin-bottom: 0.75rem;
        }
        .sam-opp-reasons {
            background: var(--bg-deep);
            border-radius: 6px;
            padding: 0.75rem;
            margin-bottom: 0.75rem;
        }
        .sam-opp-reasons-title {
            font-size: 0.7rem;
            text-transform: uppercase;
            color: var(--text-muted);
            margin-bottom: 0.4rem;
        }
        .sam-opp-reasons-list {
            font-size: 0.85rem;
            line-height: 1.5;
        }
        .sam-opp-actions {
            display: flex;
            gap: 0.75rem;
            padding-top: 0.75rem;
            border-top: 1px solid var(--border-subtle);
        }
        .sam-empty-state {
            text-align: center;
            padding: 3rem 2rem;
            color: var(--text-secondary);
        }
        .sam-empty-icon { font-size: 3rem; margin-bottom: 1rem; }
        .sam-empty-state h4 { margin: 0 0 0.5rem; font-family: 'Space Grotesk', sans-serif; }
        .sam-empty-state p { margin: 0.5rem 0; font-size: 0.9rem; }
        .sam-empty-hint { color: var(--text-muted); font-size: 0.85rem !important; }
        .sam-loading {
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            padding: 3rem;
            gap: 1rem;
        }
        .sam-loading-spinner {
            width: 40px;
            height: 40px;
            border: 3px solid var(--border-subtle);
            border-top-color: var(--gold-primary);
            border-radius: 50%;
            animation: spin 1s linear infinite;
        }
        
        /* Research Modal Styles */
        .research-layout {
            display: flex;
            flex: 1;
            overflow: hidden;
            gap: 1px;
            background: var(--border-subtle);
        }
        .research-details-panel {
            width: 280px;
            flex-shrink: 0;
            background: var(--bg-card);
            overflow-y: auto;
            padding: 1rem;
        }
        .research-main-panel {
            flex: 1;
            display: flex;
            flex-direction: column;
            background: var(--bg-deep);
            min-width: 0;
        }
        .research-actions-panel {
            width: 280px;
            flex-shrink: 0;
            background: var(--bg-card);
            overflow-y: auto;
            padding: 1rem;
        }
        .research-section {
            margin-bottom: 1.25rem;
            padding-bottom: 1rem;
            border-bottom: 1px solid var(--border-subtle);
        }
        .research-section:last-child { border-bottom: none; }
        .research-section h4 {
            margin: 0 0 0.75rem;
            font-size: 0.85rem;
            color: var(--text-secondary);
            font-weight: 500;
        }
        .research-field {
            display: flex;
            justify-content: space-between;
            padding: 0.4rem 0;
            font-size: 0.85rem;
        }
        .research-field label {
            color: var(--text-muted);
        }
        .research-field span {
            color: var(--text-primary);
            text-align: right;
            max-width: 60%;
            word-break: break-word;
        }
        .research-field.deadline span {
            color: #f59e0b;
            font-weight: 600;
        }
        .research-countdown {
            background: rgba(239, 68, 68, 0.1);
            border: 1px solid rgba(239, 68, 68, 0.3);
            border-radius: 6px;
            padding: 0.5rem;
            text-align: center;
            font-size: 0.9rem;
            color: #ef4444;
            margin-top: 0.5rem;
        }
        .research-countdown.safe {
            background: rgba(34, 197, 94, 0.1);
            border-color: rgba(34, 197, 94, 0.3);
            color: #22c55e;
        }
        .research-contacts {
            font-size: 0.85rem;
        }
        .research-contact {
            padding: 0.5rem 0;
            border-bottom: 1px solid var(--border-subtle);
        }
        .research-contact:last-child { border-bottom: none; }
        .research-contact-name { font-weight: 500; }
        .research-contact-detail { color: var(--text-muted); font-size: 0.8rem; }
        .research-contact-detail a { color: var(--gold-primary); }
        .research-attachments { font-size: 0.85rem; }
        .research-attachment {
            display: flex;
            align-items: center;
            gap: 0.5rem;
            padding: 0.4rem 0;
        }
        .research-attachment a {
            color: var(--gold-primary);
            text-decoration: none;
        }
        .research-attachment a:hover { text-decoration: underline; }
        .research-link {
            display: block;
            color: var(--gold-primary);
            text-decoration: none;
            font-size: 0.9rem;
        }
        .research-link:hover { text-decoration: underline; }
        
        /* Research Tabs */
        .research-tabs {
            display: flex;
            gap: 0;
            background: var(--bg-card);
            border-bottom: 1px solid var(--border-subtle);
            padding: 0 1rem;
        }
        .research-tab {
            padding: 0.75rem 1.25rem;
            border: none;
            background: none;
            color: var(--text-secondary);
            cursor: pointer;
            font-size: 0.9rem;
            border-bottom: 2px solid transparent;
            transition: all 0.2s;
        }
        .research-tab:hover { color: var(--text-primary); }
        .research-tab.active {
            color: var(--gold-primary);
            border-bottom-color: var(--gold-primary);
        }
        .research-tab-content {
            flex: 1;
            overflow-y: auto;
            padding: 1rem;
        }
        .research-tab-pane { display: none; }
        .research-tab-pane.active { display: block; }
        
        .research-actions-bar {
            display: flex;
            align-items: center;
            gap: 0.75rem;
            margin-bottom: 1rem;
            padding-bottom: 1rem;
            border-bottom: 1px solid var(--border-subtle);
        }
        .research-hint {
            font-size: 0.8rem;
            color: var(--text-muted);
        }
        .research-result {
            background: var(--bg-card);
            border-radius: 8px;
            padding: 1.5rem;
            min-height: 300px;
        }
        .research-result.loading {
            display: flex;
            align-items: center;
            justify-content: center;
        }
        .research-empty {
            text-align: center;
            padding: 3rem 2rem;
            color: var(--text-muted);
        }
        .research-empty span { font-size: 3rem; display: block; margin-bottom: 1rem; }
        .research-content {
            line-height: 1.7;
            font-size: 0.95rem;
        }
        .research-content h2 {
            font-size: 1.1rem;
            color: var(--gold-primary);
            margin: 1.5rem 0 0.75rem;
            padding-bottom: 0.5rem;
            border-bottom: 1px solid var(--border-subtle);
        }
        .research-content h2:first-child { margin-top: 0; }
        .research-content ul, .research-content ol {
            margin: 0.5rem 0;
            padding-left: 1.5rem;
        }
        .research-content li { margin: 0.3rem 0; }
        .research-content p { margin: 0.75rem 0; }
        .research-content strong { color: var(--text-primary); }
        
        .research-description {
            background: var(--bg-card);
            border-radius: 8px;
            padding: 1.5rem;
            line-height: 1.7;
            white-space: pre-wrap;
            font-size: 0.95rem;
        }
        
        /* Right Panel Actions */
        .research-action-btn {
            display: flex;
            align-items: center;
            gap: 0.5rem;
            width: 100%;
            padding: 0.6rem 0.75rem;
            margin-bottom: 0.5rem;
            border: 1px solid var(--border-subtle);
            border-radius: 6px;
            background: var(--bg-deep);
            color: var(--text-primary);
            cursor: pointer;
            font-size: 0.85rem;
            transition: all 0.2s;
        }
        .research-action-btn:hover {
            border-color: var(--gold-primary);
            background: rgba(212, 168, 85, 0.1);
        }
        .research-fit-score {
            text-align: center;
            padding: 1rem;
            background: var(--bg-deep);
            border-radius: 8px;
            margin-bottom: 0.75rem;
        }
        .fit-score-value {
            font-size: 2.5rem;
            font-weight: 700;
            color: var(--gold-primary);
        }
        .fit-score-label {
            font-size: 0.7rem;
            color: var(--text-muted);
            letter-spacing: 1px;
        }
        .research-fit-reasons {
            font-size: 0.8rem;
        }
        .research-fit-reason {
            display: flex;
            align-items: center;
            gap: 0.4rem;
            padding: 0.3rem 0;
            color: #22c55e;
        }
        .research-notes {
            width: 100%;
            min-height: 120px;
            padding: 0.75rem;
            background: var(--bg-deep);
            border: 1px solid var(--border-subtle);
            border-radius: 6px;
            color: var(--text-primary);
            font-size: 0.85rem;
            resize: vertical;
        }
        .research-notes:focus {
            outline: none;
            border-color: var(--gold-primary);
        }
        .research-tags {
            display: flex;
            flex-wrap: wrap;
            gap: 0.4rem;
        }
        .research-tag {
            padding: 0.3rem 0.6rem;
            border-radius: 4px;
            font-size: 0.75rem;
            cursor: pointer;
            background: var(--bg-deep);
            border: 1px solid var(--border-subtle);
            transition: all 0.2s;
        }
        .research-tag:hover { border-color: var(--gold-primary); }
        .research-tag.active {
            background: rgba(212, 168, 85, 0.2);
            border-color: var(--gold-primary);
            color: var(--gold-primary);
        }
        
        /* Proposal Workspace Styles */
        .proposal-workspace {
            background: var(--bg-deep);
        }
        .proposal-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 1rem 1.5rem;
            background: var(--bg-card);
            border-bottom: 1px solid var(--border-subtle);
        }
        .proposal-header-left {
            display: flex;
            align-items: center;
            gap: 1rem;
        }
        .proposal-title-block h2 {
            margin: 0;
            font-family: 'Space Grotesk', sans-serif;
            font-size: 1.2rem;
        }
        .proposal-meta {
            font-size: 0.8rem;
            color: var(--text-muted);
        }
        .proposal-header-right {
            display: flex;
            align-items: center;
            gap: 2rem;
        }
        .proposal-deadline {
            display: flex;
            flex-direction: column;
            align-items: flex-end;
            padding: 0.5rem 1rem;
            background: rgba(239, 68, 68, 0.1);
            border: 1px solid rgba(239, 68, 68, 0.3);
            border-radius: 8px;
        }
        .deadline-label { font-size: 0.65rem; color: #ef4444; text-transform: uppercase; }
        .deadline-value { font-size: 1rem; font-weight: 600; color: #ef4444; }
        .deadline-countdown { font-size: 0.75rem; color: #ef4444; }
        .proposal-progress {
            display: flex;
            align-items: center;
            gap: 0.75rem;
        }
        .progress-label { font-size: 0.8rem; color: var(--text-muted); }
        .proposal-progress .progress-bar {
            width: 120px;
            height: 8px;
            background: var(--bg-deep);
            border-radius: 4px;
            overflow: hidden;
        }
        .progress-fill {
            height: 100%;
            background: linear-gradient(90deg, var(--gold-primary), #22c55e);
            transition: width 0.3s;
        }
        .progress-value { font-size: 0.85rem; font-weight: 600; color: var(--gold-primary); }
        
        .proposal-nav {
            display: flex;
            gap: 0;
            background: var(--bg-card);
            border-bottom: 1px solid var(--border-subtle);
            padding: 0 1rem;
        }
        .proposal-nav-item {
            display: flex;
            align-items: center;
            gap: 0.5rem;
            padding: 0.9rem 1.25rem;
            border: none;
            background: none;
            color: var(--text-secondary);
            cursor: pointer;
            font-size: 0.9rem;
            border-bottom: 3px solid transparent;
            transition: all 0.2s;
        }
        .proposal-nav-item:hover { color: var(--text-primary); background: var(--bg-elevated); }
        .proposal-nav-item.active {
            color: var(--gold-primary);
            border-bottom-color: var(--gold-primary);
        }
        
        .proposal-content {
            flex: 1;
            overflow-y: auto;
            padding: 1.5rem;
        }
        .proposal-tab-pane { display: none; }
        .proposal-tab-pane.active { display: block; }
        
        /* Overview Tab */
        .proposal-overview-grid {
            display: grid;
            grid-template-columns: repeat(3, 1fr);
            gap: 1rem;
        }
        .proposal-card {
            background: var(--bg-card);
            border: 1px solid var(--border-subtle);
            border-radius: 12px;
            padding: 1.25rem;
        }
        .proposal-card.wide { grid-column: span 3; }
        .proposal-card h3 {
            margin: 0 0 1rem;
            font-size: 0.95rem;
            font-weight: 600;
        }
        .summary-row {
            display: flex;
            justify-content: space-between;
            padding: 0.4rem 0;
            font-size: 0.9rem;
            border-bottom: 1px solid var(--border-subtle);
        }
        .summary-row:last-child { border-bottom: none; }
        .summary-row label { color: var(--text-muted); }
        
        .proposal-dates { display: flex; flex-direction: column; gap: 0.5rem; }
        .date-item {
            display: flex;
            justify-content: space-between;
            padding: 0.5rem;
            background: var(--bg-deep);
            border-radius: 6px;
            font-size: 0.85rem;
        }
        .date-item.urgent {
            background: rgba(239, 68, 68, 0.1);
            border: 1px solid rgba(239, 68, 68, 0.3);
        }
        .date-item.urgent .date-value { color: #ef4444; font-weight: 600; }
        
        .proposal-status-grid {
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 0.75rem;
        }
        .status-item {
            text-align: center;
            padding: 0.75rem;
            background: var(--bg-deep);
            border-radius: 6px;
        }
        .status-value { display: block; font-size: 1.5rem; font-weight: 700; color: var(--gold-primary); }
        .status-label { font-size: 0.7rem; color: var(--text-muted); }
        
        .win-themes { min-height: 60px; }
        .win-theme-tag {
            display: inline-flex;
            align-items: center;
            gap: 0.5rem;
            padding: 0.4rem 0.75rem;
            margin: 0.25rem;
            background: rgba(212, 168, 85, 0.15);
            border: 1px solid rgba(212, 168, 85, 0.3);
            border-radius: 20px;
            font-size: 0.85rem;
            color: var(--gold-primary);
        }
        .win-theme-tag .remove { cursor: pointer; opacity: 0.6; }
        .win-theme-tag .remove:hover { opacity: 1; }
        
        .quick-actions-grid {
            display: grid;
            grid-template-columns: repeat(4, 1fr);
            gap: 1rem;
        }
        .quick-action {
            display: flex;
            align-items: center;
            gap: 0.75rem;
            padding: 1rem;
            background: var(--bg-deep);
            border: 1px solid var(--border-subtle);
            border-radius: 8px;
            text-align: left;
            cursor: pointer;
            transition: all 0.2s;
        }
        .quick-action:hover {
            border-color: var(--gold-primary);
            transform: translateY(-2px);
        }
        .quick-action span { font-size: 1.5rem; }
        .quick-action strong { display: block; font-size: 0.9rem; }
        .quick-action small { font-size: 0.75rem; color: var(--text-muted); }
        
        /* Compliance Matrix */
        .compliance-layout { display: flex; flex-direction: column; height: 100%; }
        .compliance-header { margin-bottom: 1rem; }
        .compliance-header h3 { margin: 0 0 0.5rem; font-family: 'Space Grotesk', sans-serif; }
        .compliance-header p { color: var(--text-muted); font-size: 0.9rem; margin: 0 0 1rem; }
        .compliance-actions { display: flex; gap: 0.75rem; }
        
        .compliance-table-wrapper {
            flex: 1;
            overflow: auto;
            background: var(--bg-card);
            border-radius: 8px;
            border: 1px solid var(--border-subtle);
        }
        .compliance-table {
            width: 100%;
            border-collapse: collapse;
            font-size: 0.85rem;
        }
        .compliance-table th {
            position: sticky;
            top: 0;
            background: var(--bg-elevated);
            padding: 0.75rem;
            text-align: left;
            font-weight: 600;
            border-bottom: 2px solid var(--border-subtle);
        }
        .compliance-table td {
            padding: 0.75rem;
            border-bottom: 1px solid var(--border-subtle);
            vertical-align: top;
        }
        .compliance-table tr:hover { background: var(--bg-elevated); }
        .compliance-table input, .compliance-table select, .compliance-table textarea {
            width: 100%;
            padding: 0.4rem;
            background: var(--bg-deep);
            border: 1px solid var(--border-subtle);
            border-radius: 4px;
            color: var(--text-primary);
            font-size: 0.85rem;
        }
        .compliance-table textarea { min-height: 60px; resize: vertical; }
        .compliance-status {
            padding: 0.3rem 0.6rem;
            border-radius: 4px;
            font-size: 0.75rem;
            font-weight: 600;
        }
        .compliance-status.complete { background: rgba(34, 197, 94, 0.2); color: #22c55e; }
        .compliance-status.partial { background: rgba(245, 158, 11, 0.2); color: #f59e0b; }
        .compliance-status.missing { background: rgba(239, 68, 68, 0.2); color: #ef4444; }
        
        .empty-compliance {
            text-align: center;
            padding: 3rem;
            color: var(--text-muted);
        }
        .empty-compliance span { font-size: 2.5rem; display: block; margin-bottom: 0.5rem; }
        
        .compliance-summary {
            display: flex;
            gap: 1rem;
            margin-top: 1rem;
            justify-content: center;
        }
        .compliance-stat {
            text-align: center;
            padding: 0.75rem 1.5rem;
            border-radius: 8px;
        }
        .compliance-stat.complete { background: rgba(34, 197, 94, 0.1); }
        .compliance-stat.partial { background: rgba(245, 158, 11, 0.1); }
        .compliance-stat.missing { background: rgba(239, 68, 68, 0.1); }
        .compliance-stat .stat-value { display: block; font-size: 1.5rem; font-weight: 700; }
        .compliance-stat.complete .stat-value { color: #22c55e; }
        .compliance-stat.partial .stat-value { color: #f59e0b; }
        .compliance-stat.missing .stat-value { color: #ef4444; }
        
        /* Outline Tab */
        .outline-layout { display: flex; height: calc(100vh - 220px); gap: 1rem; }
        .outline-sidebar {
            width: 300px;
            flex-shrink: 0;
            background: var(--bg-card);
            border-radius: 8px;
            padding: 1rem;
            display: flex;
            flex-direction: column;
        }
        .outline-sidebar h4 { margin: 0 0 1rem; font-size: 0.9rem; }
        .outline-sections { flex: 1; overflow-y: auto; }
        .outline-section-item {
            padding: 0.75rem;
            margin-bottom: 0.5rem;
            background: var(--bg-deep);
            border: 1px solid var(--border-subtle);
            border-radius: 6px;
            cursor: pointer;
            transition: all 0.2s;
        }
        .outline-section-item:hover { border-color: var(--gold-primary); }
        .outline-section-item.active {
            border-color: var(--gold-primary);
            background: rgba(212, 168, 85, 0.1);
        }
        .outline-section-item .section-num { font-size: 0.75rem; color: var(--text-muted); }
        .outline-section-item .section-title { font-weight: 500; font-size: 0.9rem; }
        .outline-section-item .section-status {
            font-size: 0.7rem;
            padding: 0.15rem 0.4rem;
            border-radius: 3px;
            margin-top: 0.25rem;
            display: inline-block;
        }
        .outline-editor {
            flex: 1;
            background: var(--bg-card);
            border-radius: 8px;
            display: flex;
            flex-direction: column;
            overflow: hidden;
        }
        .outline-editor-header {
            padding: 1rem;
            border-bottom: 1px solid var(--border-subtle);
        }
        .outline-editor-header h3 { margin: 0; font-size: 1rem; }
        .outline-editor-content { flex: 1; padding: 1rem; overflow-y: auto; }
        .outline-empty-editor {
            text-align: center;
            padding: 3rem;
            color: var(--text-muted);
        }
        .outline-empty-editor span { font-size: 3rem; display: block; margin-bottom: 1rem; }
        
        /* Content Tab */
        .content-layout { display: flex; height: calc(100vh - 220px); gap: 1rem; }
        .content-sections-list {
            width: 250px;
            flex-shrink: 0;
            background: var(--bg-card);
            border-radius: 8px;
            padding: 1rem;
            overflow-y: auto;
        }
        .content-sections-list h4 { margin: 0 0 1rem; font-size: 0.9rem; }
        .content-section-btn {
            display: block;
            width: 100%;
            padding: 0.6rem 0.75rem;
            margin-bottom: 0.4rem;
            background: var(--bg-deep);
            border: 1px solid var(--border-subtle);
            border-radius: 6px;
            text-align: left;
            cursor: pointer;
            font-size: 0.85rem;
            color: var(--text-primary);
        }
        .content-section-btn:hover { border-color: var(--gold-primary); }
        .content-section-btn.active { border-color: var(--gold-primary); background: rgba(212, 168, 85, 0.1); }
        .content-section-btn.complete { border-left: 3px solid #22c55e; }
        
        .content-editor-area {
            flex: 1;
            display: flex;
            flex-direction: column;
            background: var(--bg-card);
            border-radius: 8px;
            overflow: hidden;
        }
        .content-editor-toolbar {
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 0.75rem 1rem;
            background: var(--bg-elevated);
            border-bottom: 1px solid var(--border-subtle);
        }
        .content-editor-toolbar span { font-weight: 500; }
        .toolbar-actions { display: flex; gap: 0.5rem; }
        .content-textarea {
            flex: 1;
            padding: 1rem;
            background: var(--bg-card);
            border: none;
            color: var(--text-primary);
            font-size: 0.95rem;
            line-height: 1.7;
            resize: none;
        }
        .content-textarea:focus { outline: none; }
        .content-stats {
            display: flex;
            gap: 1.5rem;
            padding: 0.5rem 1rem;
            background: var(--bg-elevated);
            font-size: 0.8rem;
            color: var(--text-muted);
        }
        
        .content-ai-panel {
            width: 300px;
            flex-shrink: 0;
            background: var(--bg-card);
            border-radius: 8px;
            padding: 1rem;
            display: flex;
            flex-direction: column;
        }
        .content-ai-panel h4 { margin: 0 0 1rem; font-size: 0.9rem; }
        .ai-suggestions { flex: 1; overflow-y: auto; font-size: 0.85rem; }
        .ai-prompt-area { margin-top: 1rem; }
        .ai-prompt-area textarea {
            width: 100%;
            min-height: 80px;
            padding: 0.75rem;
            background: var(--bg-deep);
            border: 1px solid var(--border-subtle);
            border-radius: 6px;
            color: var(--text-primary);
            font-size: 0.85rem;
            resize: none;
            margin-bottom: 0.5rem;
        }
        .ai-prompt-area button { width: 100%; }
        
        /* Review Tab */
        .review-layout { display: flex; gap: 1.5rem; }
        .review-stages { flex: 1; display: flex; flex-direction: column; gap: 1rem; }
        .review-stage {
            background: var(--bg-card);
            border: 1px solid var(--border-subtle);
            border-radius: 10px;
            overflow: hidden;
        }
        .stage-header {
            display: flex;
            align-items: center;
            gap: 1rem;
            padding: 1rem;
            background: var(--bg-elevated);
            cursor: pointer;
        }
        .stage-icon { font-size: 1.5rem; }
        .stage-header strong { display: block; }
        .stage-header small { font-size: 0.8rem; color: var(--text-muted); }
        .stage-status {
            margin-left: auto;
            padding: 0.3rem 0.75rem;
            border-radius: 4px;
            font-size: 0.75rem;
            background: var(--bg-deep);
        }
        .stage-status.complete { background: rgba(34, 197, 94, 0.2); color: #22c55e; }
        .stage-status.in-progress { background: rgba(245, 158, 11, 0.2); color: #f59e0b; }
        .stage-content { padding: 1rem; }
        
        .review-comments {
            width: 400px;
            flex-shrink: 0;
            background: var(--bg-card);
            border-radius: 10px;
            padding: 1rem;
        }
        .review-comments h4 { margin: 0 0 1rem; }
        .comments-list {
            max-height: 400px;
            overflow-y: auto;
            margin-bottom: 1rem;
        }
        .comment-item {
            padding: 0.75rem;
            background: var(--bg-deep);
            border-radius: 6px;
            margin-bottom: 0.5rem;
            font-size: 0.85rem;
        }
        .comment-meta { font-size: 0.75rem; color: var(--text-muted); margin-bottom: 0.25rem; }
        .add-comment textarea {
            width: 100%;
            min-height: 60px;
            padding: 0.5rem;
            background: var(--bg-deep);
            border: 1px solid var(--border-subtle);
            border-radius: 6px;
            color: var(--text-primary);
            margin-bottom: 0.5rem;
        }
        .add-comment select {
            width: 100%;
            padding: 0.4rem;
            background: var(--bg-deep);
            border: 1px solid var(--border-subtle);
            border-radius: 6px;
            color: var(--text-primary);
            margin-bottom: 0.5rem;
        }
        
        /* Submit Tab */
        .submit-layout { display: flex; gap: 2rem; }
        .submit-checklist {
            flex: 1;
            background: var(--bg-card);
            border-radius: 10px;
            padding: 1.5rem;
        }
        .submit-checklist h3 { margin: 0 0 1.5rem; font-family: 'Space Grotesk', sans-serif; }
        .checklist-items { display: flex; flex-direction: column; gap: 0.75rem; }
        .checklist-item {
            display: flex;
            align-items: flex-start;
            gap: 0.75rem;
            padding: 1rem;
            background: var(--bg-deep);
            border-radius: 8px;
            border: 1px solid var(--border-subtle);
        }
        .checklist-item input[type="checkbox"] {
            width: 20px;
            height: 20px;
            margin-top: 0.1rem;
            accent-color: var(--gold-primary);
        }
        .checklist-item label { cursor: pointer; }
        .checklist-item label strong { display: block; }
        .checklist-item label small { font-size: 0.8rem; color: var(--text-muted); }
        .checklist-item:has(input:checked) {
            background: rgba(34, 197, 94, 0.05);
            border-color: rgba(34, 197, 94, 0.3);
        }
        
        .submit-actions {
            width: 400px;
            flex-shrink: 0;
        }
        .submit-actions h3 { margin: 0 0 1.5rem; font-family: 'Space Grotesk', sans-serif; }
        .final-actions { display: flex; flex-direction: column; gap: 1rem; }
        .submit-action-btn {
            display: flex;
            align-items: center;
            gap: 1rem;
            padding: 1.25rem;
            background: var(--bg-card);
            border: 1px solid var(--border-subtle);
            border-radius: 10px;
            cursor: pointer;
            text-align: left;
            transition: all 0.2s;
        }
        .submit-action-btn:hover { border-color: var(--gold-primary); transform: translateX(4px); }
        .submit-action-btn span { font-size: 1.5rem; }
        .submit-action-btn strong { display: block; }
        .submit-action-btn small { font-size: 0.8rem; color: var(--text-muted); }
        .submit-action-btn.primary {
            background: linear-gradient(135deg, var(--gold-primary), #c9a050);
            border-color: var(--gold-primary);
        }
        .submit-action-btn.primary strong, .submit-action-btn.primary small { color: #0a0a0b; }
        .sam-loading {
            display: flex;
            align-items: center;
            justify-content: center;
            padding: 3rem;
            color: var(--text-muted);
        }
        .sam-loading::after {
            content: '';
            width: 24px;
            height: 24px;
            border: 2px solid rgba(59,130,246,0.3);
            border-top-color: #3b82f6;
            border-radius: 50%;
            margin-left: 0.75rem;
            animation: spin 1s linear infinite;
        }
        @keyframes spin { to { transform: rotate(360deg); } }
        
        /* Discovery Tab Styles */
        .discovery-layout {
            display: flex;
            height: 100%;
            gap: 1rem;
            padding: 1rem;
        }
        .discovery-sidebar {
            width: 260px;
            flex-shrink: 0;
            display: flex;
            flex-direction: column;
        }
        .discovery-sidebar-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 0.75rem;
        }
        .discovery-sidebar-header h3 {
            font-family: 'Space Grotesk', sans-serif;
            font-size: 1rem;
            margin: 0;
        }
        .saved-searches-list {
            flex: 1;
            overflow-y: auto;
            display: flex;
            flex-direction: column;
            gap: 0.5rem;
            min-height: 150px;
        }
        .saved-search-item {
            background: var(--bg-card);
            border: 1px solid var(--border-subtle);
            border-radius: 8px;
            padding: 0.75rem;
            cursor: pointer;
            transition: all 0.2s;
        }
        .saved-search-item:hover { border-color: rgba(34, 197, 94, 0.5); }
        .saved-search-item.disabled { opacity: 0.5; }
        .saved-search-name {
            font-weight: 600;
            font-size: 0.9rem;
            margin-bottom: 0.25rem;
        }
        .saved-search-meta {
            font-size: 0.75rem;
            color: var(--text-muted);
        }
        .discovery-stats {
            display: flex;
            justify-content: space-around;
            margin-top: 1rem;
            padding-top: 1rem;
            border-top: 1px solid var(--border-subtle);
        }
        .discovery-stat { text-align: center; }
        .discovery-stat-value {
            display: block;
            font-size: 1.25rem;
            font-weight: 600;
            color: #22c55e;
        }
        .discovery-stat-label {
            font-size: 0.7rem;
            color: var(--text-muted);
            text-transform: uppercase;
        }
        .discovery-queue {
            flex: 1;
            display: flex;
            flex-direction: column;
            min-width: 0;
        }
        .discovery-queue-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 0.75rem;
        }
        .discovery-queue-header h3 {
            font-family: 'Space Grotesk', sans-serif;
            font-size: 1rem;
            margin: 0;
        }
        .discovery-queue-list {
            flex: 1;
            overflow-y: auto;
            display: flex;
            flex-direction: column;
            gap: 0.5rem;
        }
        .discovery-card {
            background: var(--bg-card);
            border: 1px solid var(--border-subtle);
            border-radius: 10px;
            padding: 1rem;
            cursor: pointer;
            transition: all 0.2s;
        }
        .discovery-card:hover {
            border-color: rgba(34, 197, 94, 0.5);
            transform: translateX(2px);
        }
        .discovery-card.active {
            border-color: #22c55e;
            background: rgba(34, 197, 94, 0.05);
        }
        .discovery-card-header {
            display: flex;
            justify-content: space-between;
            align-items: flex-start;
            gap: 1rem;
        }
        .discovery-card-title {
            font-weight: 600;
            font-size: 0.9rem;
            line-height: 1.3;
            flex: 1;
        }
        .discovery-card-badges { display: flex; gap: 0.4rem; }
        .discovery-card-meta {
            display: flex;
            flex-wrap: wrap;
            gap: 0.75rem;
            margin-top: 0.5rem;
            font-size: 0.75rem;
            color: var(--text-secondary);
        }
        .discovery-workflow {
            width: 400px;
            flex-shrink: 0;
            background: var(--bg-card);
            border: 1px solid rgba(34, 197, 94, 0.3);
            border-radius: 12px;
            display: flex;
            flex-direction: column;
            overflow: hidden;
        }
        .workflow-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 1rem 1.25rem;
            border-bottom: 1px solid var(--border-subtle);
            background: rgba(34, 197, 94, 0.05);
        }
        .workflow-header h3 {
            font-family: 'Space Grotesk', sans-serif;
            font-size: 1rem;
            margin: 0;
        }
        .workflow-progress {
            display: flex;
            padding: 0.75rem 1rem;
            gap: 0.25rem;
            border-bottom: 1px solid var(--border-subtle);
            background: var(--bg-deep);
        }
        .workflow-step {
            flex: 1;
            display: flex;
            flex-direction: column;
            align-items: center;
            padding: 0.5rem 0.25rem;
            border-radius: 6px;
            opacity: 0.4;
            transition: all 0.2s;
        }
        .workflow-step.active {
            opacity: 1;
            background: rgba(34, 197, 94, 0.1);
        }
        .workflow-step.completed {
            opacity: 0.8;
        }
        .workflow-step.completed .step-number {
            background: #22c55e;
            color: white;
        }
        .step-number {
            width: 24px;
            height: 24px;
            border-radius: 50%;
            background: var(--bg-card);
            border: 2px solid var(--border-subtle);
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 0.75rem;
            font-weight: 600;
            margin-bottom: 0.25rem;
        }
        .workflow-step.active .step-number {
            border-color: #22c55e;
            color: #22c55e;
        }
        .step-label {
            font-size: 0.65rem;
            text-align: center;
            color: var(--text-muted);
        }
        .workflow-content {
            flex: 1;
            overflow-y: auto;
            padding: 1.25rem;
        }
        .workflow-actions {
            display: flex;
            gap: 0.75rem;
            padding: 1rem 1.25rem;
            border-top: 1px solid var(--border-subtle);
            background: var(--bg-deep);
        }
        .workflow-field {
            margin-bottom: 1rem;
        }
        .workflow-field label {
            display: block;
            font-size: 0.75rem;
            color: var(--text-muted);
            margin-bottom: 0.4rem;
            text-transform: uppercase;
            letter-spacing: 0.5px;
        }
        .workflow-field-value {
            padding: 0.6rem;
            background: var(--bg-deep);
            border-radius: 6px;
            font-size: 0.9rem;
        }
        .workflow-field textarea {
            width: 100%;
            min-height: 100px;
            padding: 0.75rem;
            background: var(--bg-deep);
            border: 1px solid var(--border-subtle);
            border-radius: 6px;
            color: var(--text-primary);
            font-family: inherit;
            resize: vertical;
        }
        .workflow-analysis {
            background: rgba(34, 197, 94, 0.05);
            border: 1px solid rgba(34, 197, 94, 0.2);
            border-radius: 8px;
            padding: 1rem;
            margin-top: 0.75rem;
            white-space: pre-wrap;
            font-size: 0.85rem;
            line-height: 1.5;
        }
        .workflow-analyze-btn {
            display: inline-flex;
            align-items: center;
            gap: 0.4rem;
            padding: 0.4rem 0.75rem;
            background: rgba(34, 197, 94, 0.1);
            border: 1px solid rgba(34, 197, 94, 0.3);
            border-radius: 6px;
            color: #22c55e;
            cursor: pointer;
            font-size: 0.8rem;
            transition: all 0.2s;
        }
        .workflow-analyze-btn:hover { background: rgba(34, 197, 94, 0.2); }
        .workflow-analyze-btn:disabled { opacity: 0.5; cursor: not-allowed; }
        .discovery-empty {
            text-align: center;
            padding: 2rem 1rem;
            color: var(--text-muted);
            font-size: 0.85rem;
        }
        .discovery-badge {
            background: rgba(34, 197, 94, 0.2) !important;
            color: #22c55e !important;
        }


/* ==========================================================================
   SECTION: RFP Manager Styles (from admin.html inline style block 3)
   ========================================================================== */
        /* RFP Manager Styles */
        .rfp-tab {
            display: flex;
            align-items: center;
            gap: 0.5rem;
            padding: 0.5rem 1rem;
            background: transparent;
            border: 1px solid var(--border-subtle);
            border-radius: 6px;
            color: var(--text-secondary);
            cursor: pointer;
            transition: all 0.2s;
        }
        .rfp-tab:hover {
            background: var(--bg-elevated);
            color: var(--text-primary);
        }
        .rfp-tab.active {
            background: var(--gold-primary);
            border-color: var(--gold-primary);
            color: #000;
        }
        .rfp-tab-count {
            background: rgba(255,255,255,0.2);
            padding: 0.1rem 0.4rem;
            border-radius: 10px;
            font-size: 0.75rem;
        }
        .rfp-tab.active .rfp-tab-count {
            background: rgba(0,0,0,0.2);
        }
        
        .rfp-item {
            display: flex;
            align-items: center;
            gap: 1rem;
            padding: 1rem;
            background: var(--bg-card);
            border: 1px solid var(--border-subtle);
            border-radius: 8px;
            margin-bottom: 0.75rem;
            cursor: pointer;
            transition: all 0.2s;
        }
        .rfp-item:hover {
            border-color: var(--gold-primary);
            transform: translateX(4px);
        }
        .rfp-item-type {
            padding: 0.25rem 0.5rem;
            border-radius: 4px;
            font-size: 0.75rem;
            font-weight: 600;
            text-transform: uppercase;
        }
        .rfp-item-type.rfi { background: #3b82f6; color: white; }
        .rfp-item-type.rfp { background: #22c55e; color: white; }
        .rfp-item-type.rfq { background: #f59e0b; color: white; }
        
        .rfp-item-direction {
            padding: 0.25rem 0.5rem;
            border-radius: 4px;
            font-size: 0.7rem;
            text-transform: uppercase;
        }
        .rfp-item-direction.inbound { background: rgba(139, 92, 246, 0.2); color: #a78bfa; }
        .rfp-item-direction.outbound { background: rgba(212, 168, 85, 0.2); color: #d4a855; }
        
        .rfp-item-info { flex: 1; }
        .rfp-item-title { font-weight: 500; margin-bottom: 0.25rem; }
        .rfp-item-meta { font-size: 0.85rem; color: var(--text-muted); }
        
        .rfp-item-status {
            padding: 0.25rem 0.75rem;
            border-radius: 20px;
            font-size: 0.75rem;
        }
        .rfp-item-status.draft { background: rgba(100, 116, 139, 0.2); color: #94a3b8; }
        .rfp-item-status.issued { background: rgba(59, 130, 246, 0.2); color: #60a5fa; }
        .rfp-item-status.responses_open { background: rgba(34, 197, 94, 0.2); color: #4ade80; }
        .rfp-item-status.under_review { background: rgba(245, 158, 11, 0.2); color: #fbbf24; }
        .rfp-item-status.shortlisted { background: rgba(168, 85, 247, 0.2); color: #c084fc; }
        .rfp-item-status.awarded { background: rgba(34, 197, 94, 0.3); color: #22c55e; }
        .rfp-item-status.rejected { background: rgba(239, 68, 68, 0.2); color: #f87171; }
        
        .rfp-item-deadline {
            font-size: 0.8rem;
            color: var(--text-muted);
            text-align: right;
        }
        .rfp-item-deadline.urgent { color: #ef4444; }
        
        .rfp-template-card {
            display: flex;
            align-items: center;
            gap: 1rem;
            padding: 1.25rem;
            background: var(--bg-card);
            border: 1px solid var(--border-subtle);
            border-radius: 12px;
            cursor: pointer;
            transition: all 0.2s;
        }
        .rfp-template-card:hover {
            border-color: var(--gold-primary);
            transform: translateY(-2px);
            box-shadow: 0 4px 12px rgba(212, 168, 85, 0.15);
        }
        .rfp-template-icon {
            width: 48px;
            height: 48px;
            border-radius: 10px;
            display: flex;
            align-items: center;
            justify-content: center;
            color: white;
        }
        .rfp-template-title {
            font-weight: 600;
            margin-bottom: 0.25rem;
        }
        .rfp-template-desc {
            font-size: 0.85rem;
            color: var(--text-muted);
        }
        
        .rfp-empty-state {
            text-align: center;
            padding: 3rem;
            color: var(--text-muted);
        }
        .rfp-empty-state svg {
            width: 64px;
            height: 64px;
            margin-bottom: 1rem;
            opacity: 0.5;
        }

/* ===== TALK-THROUGH SECTION REFINEMENT ===== */
.proposal-section-editable { position: relative; cursor: pointer; border-left: 3px solid transparent; padding-left: 1rem; transition: border-color 0.2s, background 0.2s; margin-bottom: 0.5rem; }
.proposal-section-editable:hover { border-left-color: var(--gold-primary); background: rgba(212,168,83,0.03); }
.proposal-section-editable.active { border-left-color: var(--gold-primary); background: rgba(212,168,83,0.05); }
.proposal-section-editable:hover::after { content: 'Click to refine'; position: absolute; top: 0.5rem; right: 0.5rem; font-size: 0.65rem; color: var(--gold-primary); padding: 0.2rem 0.5rem; background: rgba(0,0,0,0.5); border-radius: 4px; pointer-events: none; }
.talk-through-panel { background: rgba(0,0,0,0.3); border: 1px solid rgba(212,168,83,0.2); border-radius: 8px; padding: 1rem; margin-top: 0.5rem; margin-bottom: 1rem; }
.talk-through-input { width: 100%; background: rgba(0,0,0,0.4); border: 1px solid rgba(255,255,255,0.1); color: #E8E6E3; padding: 0.6rem; border-radius: 6px; font-size: 0.9rem; outline: none; }
.talk-through-input:focus { border-color: var(--gold-primary); }
.talk-through-history { max-height: 200px; overflow-y: auto; margin-bottom: 0.75rem; padding: 0.5rem; background: rgba(0,0,0,0.2); border-radius: 6px; }
.talk-through-msg { padding: 0.4rem 0; font-size: 0.85rem; border-bottom: 1px solid rgba(255,255,255,0.05); }
.talk-through-msg:last-child { border-bottom: none; }
.talk-through-msg.user { color: var(--gold-primary); }
.talk-through-msg.assistant { color: rgba(232,230,227,0.7); }

/* ===== AI PERSONA REVIEW ===== */
.persona-review { padding: 2rem; }
.persona-score { display: flex; align-items: center; gap: 1.5rem; margin-bottom: 2rem; }
.persona-score-circle { width: 80px; height: 80px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 1.8rem; font-weight: 700; }
.score-high { background: rgba(34,197,94,0.15); color: #22c55e; border: 2px solid #22c55e; }
.score-medium { background: rgba(234,179,8,0.15); color: #eab308; border: 2px solid #eab308; }
.score-low { background: rgba(239,68,68,0.15); color: #ef4444; border: 2px solid #ef4444; }
.persona-concern { padding: 0.75rem; border-radius: 8px; margin-bottom: 0.5rem; border-left: 3px solid; }
.persona-concern.high { border-color: #ef4444; background: rgba(239,68,68,0.05); }
.persona-concern.medium { border-color: #eab308; background: rgba(234,179,8,0.05); }
.persona-concern.low { border-color: #3b82f6; background: rgba(59,130,246,0.05); }

/* ===== INSPIRATION SECTION ===== */
.inspiration-story-card { display: flex; gap: 1rem; padding: 0.75rem; border: 1px solid rgba(255,255,255,0.1); border-radius: 8px; cursor: pointer; transition: border-color 0.2s, background 0.2s; }
.inspiration-story-card:hover { border-color: rgba(212,168,83,0.4); }
.inspiration-story-card.selected { border-color: var(--gold-primary); background: rgba(212,168,83,0.08); }
.inspiration-story-name { font-weight: 600; font-size: 0.9rem; }
.inspiration-story-era { font-size: 0.75rem; color: var(--text-muted); }
.inspiration-story-themes { display: flex; gap: 0.25rem; flex-wrap: wrap; margin-top: 0.25rem; }
.inspiration-story-theme { font-size: 0.65rem; padding: 0.15rem 0.4rem; background: rgba(212,168,83,0.1); border-radius: 4px; color: var(--gold-primary); }

/* ===== DESIGN AGENT ===== */
.design-theme-select { width: 100%; padding: 0.5rem; background: rgba(0,0,0,0.3); border: 1px solid rgba(255,255,255,0.1); color: #E8E6E3; border-radius: 6px; margin-bottom: 0.5rem; font-size: 0.85rem; }
.design-theme-select:focus { border-color: var(--gold-primary); outline: none; }

/* ===== PROPOSAL VIEWER INSPIRATION ===== */
.pv-inspiration-text { font-size: 1.15rem; line-height: 2; }
.pv-inspiration-text p:first-child { font-size: 1.3rem; color: var(--pv-accent, var(--gold-primary, #D4A853)); font-weight: 500; }
/* ===== PROSPECTING INTELLIGENCE MODULE ===== */
.prospecting-intel-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    background: rgba(0, 0, 0, 0.8);
    align-items: center;
    justify-content: center;
}

.prospecting-intel-modal.active {
    display: flex;
}

.prospecting-modal-content {
    background: linear-gradient(135deg, #0f1117 0%, #1a1d29 100%);
    border: 1px solid rgba(212, 168, 83, 0.3);
    border-radius: 16px;
    width: 95%;
    max-width: 1600px;
    height: 90vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.prospecting-header {
    padding: 24px 32px;
    border-bottom: 1px solid rgba(212, 168, 83, 0.2);
    display: flex;
    align-items: center;
    gap: 16px;
}

.prospecting-header h2 {
    font-size: 24px;
    font-family: 'Space Grotesk', sans-serif;
    color: #D4A853;
    margin: 0;
}

.prospecting-subtitle {
    color: var(--text-muted);
    font-size: 14px;
}

.prospecting-body {
    flex: 1;
    display: grid;
    grid-template-columns: 280px 1fr 320px;
    gap: 20px;
    padding: 24px;
    overflow: hidden;
}

/* Left Panel: Configuration */
.prospecting-config-panel {
    display: flex;
    flex-direction: column;
    gap: 16px;
    overflow-y: auto;
}

.config-section {
    background: rgba(15, 17, 23, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 16px;
}

.config-section label {
    display: block;
    font-size: 11px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}

.config-section select,
.config-section input[type="number"] {
    width: 100%;
    padding: 10px 12px;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 13px;
}

.config-section select:focus,
.config-section input[type="number"]:focus {
    border-color: rgba(212, 168, 83, 0.5);
    outline: none;
}

.region-buttons {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.region-buttons button {
    padding: 8px 12px;
    background: rgba(212, 168, 83, 0.1);
    border: 1px solid rgba(212, 168, 83, 0.2);
    border-radius: 8px;
    color: #D4A853;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s;
}

.region-buttons button:hover {
    background: rgba(212, 168, 83, 0.2);
    border-color: rgba(212, 168, 83, 0.4);
}

.batch-summary {
    background: rgba(212, 168, 83, 0.1);
    border: 1px solid rgba(212, 168, 83, 0.2);
    border-radius: 12px;
    padding: 16px;
    text-align: center;
}

.summary-stat {
    font-size: 13px;
    color: var(--text-muted);
    margin: 4px 0;
}

.summary-stat span {
    font-size: 20px;
    font-weight: 700;
    color: #D4A853;
    font-family: 'Space Grotesk', sans-serif;
}

/* Middle Panel: State Grid */
.prospecting-states-panel {
    background: rgba(15, 17, 23, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.states-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.states-header h3 {
    font-size: 14px;
    color: var(--text-primary);
    margin: 0;
}

.states-actions {
    display: flex;
    gap: 8px;
}

.states-actions button {
    padding: 6px 12px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    color: var(--text-secondary);
    font-size: 11px;
    cursor: pointer;
    transition: all 0.2s;
}

.states-actions button:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(212, 168, 83, 0.3);
}

.states-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 8px;
    overflow-y: auto;
    flex: 1;
}

.state-checkbox-item {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 8px;
    padding: 10px 12px;
    cursor: pointer;
    transition: all 0.2s;
}

.state-checkbox-item:hover {
    border-color: rgba(212, 168, 83, 0.3);
    background: rgba(212, 168, 83, 0.05);
}

.state-checkbox-item input[type="checkbox"] {
    margin-right: 8px;
    accent-color: #D4A853;
    cursor: pointer;
}

.state-checkbox-item label {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-size: 12px;
}

.state-code {
    font-weight: 700;
    color: #D4A853;
    margin-right: 6px;
}

.state-name {
    color: var(--text-secondary);
}

/* Right Panel: Progress */
.prospecting-progress-panel {
    display: flex;
    flex-direction: column;
    gap: 16px;
    overflow-y: auto;
}

.progress-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.progress-header h3 {
    font-size: 14px;
    color: var(--text-primary);
    margin: 0;
}

.status-badge.running {
    background: rgba(59, 130, 246, 0.2);
    color: #60a5fa;
}

.status-badge.complete {
    background: rgba(34, 197, 94, 0.2);
    color: #22c55e;
}

.status-badge.cancelled {
    background: rgba(245, 158, 11, 0.2);
    color: #f59e0b;
}

.progress-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}

.stat-box {
    background: rgba(15, 17, 23, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    padding: 12px;
    text-align: center;
}

.stat-value {
    font-size: 24px;
    font-weight: 700;
    color: #D4A853;
    font-family: 'Space Grotesk', sans-serif;
}

.stat-label {
    font-size: 10px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 4px;
}

.progress-bar-container {
    background: rgba(0, 0, 0, 0.4);
    border-radius: 8px;
    height: 24px;
    position: relative;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #D4A853, #E8C875);
    border-radius: 8px;
    transition: width 0.3s ease;
}

.progress-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 11px;
    font-weight: 600;
    color: white;
    text-shadow: 0 1px 2px rgba(0,0,0,0.5);
}

/* Contact Results Viewer */
.contact-results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}
.contact-results-header h4 {
    margin: 0;
    font-size: 13px;
    color: rgba(245,245,245,0.9);
}
.contact-results-list {
    max-height: 320px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.contact-result-org {
    background: rgba(15, 17, 23, 0.5);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 8px;
    overflow: hidden;
}
.contact-result-org-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    cursor: pointer;
    font-size: 12px;
    color: rgba(245,245,245,0.85);
}
.contact-result-org-header:hover {
    background: rgba(255,255,255,0.04);
}
.contact-result-type-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}
.contact-result-org-name {
    flex: 1;
    font-weight: 600;
}
.contact-result-count {
    background: rgba(212,168,83,0.2);
    color: var(--gold-primary);
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 10px;
    font-weight: 600;
}
.contact-result-chevron {
    color: rgba(245,245,245,0.3);
    font-size: 10px;
    transition: transform 0.2s;
}
.contact-result-org.expanded .contact-result-chevron {
    transform: rotate(90deg);
}
.contact-result-contacts {
    display: none;
    padding: 0 12px 8px;
}
.contact-result-org.expanded .contact-result-contacts {
    display: block;
}
.contact-result-row {
    display: flex;
    gap: 8px;
    padding: 4px 0;
    border-top: 1px solid rgba(255,255,255,0.04);
    font-size: 11px;
    flex-wrap: wrap;
}
.contact-result-name {
    color: rgba(245,245,245,0.9);
    font-weight: 500;
    min-width: 120px;
}
.contact-result-title {
    color: rgba(245,245,245,0.5);
    font-style: italic;
}
.contact-result-email {
    color: var(--gold-primary);
    margin-left: auto;
}

.activity-log {
    background: rgba(15, 17, 23, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 14px;
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 200px;
}

.activity-log h4 {
    font-size: 11px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin: 0 0 10px 0;
}

.log-scroll {
    flex: 1;
    overflow-y: auto;
    font-family: 'Space Grotesk', sans-serif;
    font-size: 11px;
}

.log-entry {
    padding: 4px 0;
    color: var(--text-secondary);
}

.log-entry.empty {
    color: rgba(245, 245, 245, 0.3);
    font-style: italic;
}

.log-entry.success {
    color: #22c55e;
}

.log-entry.error {
    color: #ef4444;
}

.log-entry.warning {
    color: #f59e0b;
}

.log-time {
    color: rgba(245, 245, 245, 0.4);
    margin-right: 8px;
}

.help-text {
    font-size: 10px;
    color: rgba(245, 245, 245, 0.5);
    margin-top: 4px;
    display: block;
}

/* ===== PROSPECTING TABS ===== */
.prospecting-tabs {
    display: flex;
    gap: 8px;
    margin-top: 12px;
}

.prospecting-tab {
    padding: 8px 16px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: var(--text-secondary);
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s;
}

.prospecting-tab:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(212, 168, 83, 0.3);
}

.prospecting-tab.active {
    background: rgba(212, 168, 83, 0.2);
    border-color: rgba(212, 168, 83, 0.5);
    color: #D4A853;
    font-weight: 600;
}

/* ===== CONTACT DISCOVERY STYLES ===== */
.contact-org-types {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.contact-checkbox-label {
    display: flex;
    align-items: center;
    padding: 8px 10px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 12px;
    color: var(--text-secondary);
}

.contact-checkbox-label:hover {
    border-color: rgba(212, 168, 83, 0.3);
    background: rgba(212, 168, 83, 0.05);
}

.contact-checkbox-label input[type="checkbox"] {
    margin-right: 8px;
    accent-color: #D4A853;
    cursor: pointer;
}

.contact-checkbox-label input[type="checkbox"]:checked + span {
    color: #D4A853;
    font-weight: 600;
}

/* ===== EMAIL HEALTH DASHBOARD ===== */
.emailHealthTab {
    padding: 0.5rem 1rem;
    background: var(--surface-2);
    border: 1px solid var(--border-subtle);
    color: var(--text-muted);
    cursor: pointer;
    border-radius: 6px;
    font-size: 0.8rem;
    transition: all 0.2s;
}

.emailHealthTab:hover {
    border-color: var(--gold-primary);
    color: var(--gold-primary);
}

.emailHealthTab.active {
    background: var(--gold-primary);
    color: var(--bg-primary);
    border-color: var(--gold-primary);
    font-weight: 600;
}

.email-health-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--border-subtle);
    border-top-color: var(--gold-primary);
    border-radius: 50%;
    animation: emailHealthSpin 0.8s linear infinite;
    margin: 0 auto;
}

@keyframes emailHealthSpin {
    to { transform: rotate(360deg); }
}

.email-health-card {
    background: var(--surface-2);
    border: 1px solid var(--border-subtle);
    border-radius: 8px;
    padding: 1rem;
    transition: all 0.2s;
}

.email-health-card:hover {
    border-color: var(--gold-primary);
    box-shadow: 0 4px 12px rgba(212, 168, 83, 0.1);
}

.email-health-metric {
    display: flex;
    justify-content: space-between;
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--border-subtle);
}

.email-health-metric:last-child {
    border-bottom: none;
}

.email-health-metric-label {
    color: var(--text-muted);
    font-size: 0.875rem;
}

.email-health-metric-value {
    font-weight: bold;
}

.email-health-status-badge {
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
}

.email-health-status-pass {
    background: rgba(34, 197, 94, 0.2);
    color: #22c55e;
}

.email-health-status-fail {
    background: rgba(239, 68, 68, 0.2);
    color: #ef4444;
}

.email-health-status-unknown {
    background: rgba(160, 160, 160, 0.2);
    color: #a0a0a0;
}

.email-health-quick-actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-top: 1rem;
}

.email-health-quick-btn {
    background: transparent;
    border: 1px solid var(--border-subtle);
    color: var(--text-secondary);
    padding: 0.5rem 1rem;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.8rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.2s;
}

.email-health-quick-btn:hover {
    border-color: var(--gold-primary);
    color: var(--gold-primary);
}

.email-health-score-ring {
    position: relative;
    width: 140px;
    height: 140px;
    margin: 0 auto;
}

.email-health-score-ring svg {
    transform: rotate(-90deg);
}

.email-health-score-ring-bg {
    fill: none;
    stroke: var(--border-subtle);
    stroke-width: 8;
}

.email-health-score-ring-progress {
    fill: none;
    stroke-width: 8;
    stroke-linecap: round;
    transition: stroke-dashoffset 0.5s ease;
}

.email-health-score-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
}

.email-health-alert {
    padding: 0.75rem;
    border-radius: 6px;
    margin-bottom: 0.5rem;
    border-left: 3px solid;
}

.email-health-alert-critical {
    background: rgba(239, 68, 68, 0.1);
    border-color: #ef4444;
}

.email-health-alert-warning {
    background: rgba(245, 158, 11, 0.1);
    border-color: #f59e0b;
}

.email-health-alert-success {
    background: rgba(34, 197, 94, 0.1);
    border-color: #22c55e;
}

/* Email Health Panel specific overrides */
#emailHealthPanel {
    background: #0a0a0f !important;
}

#emailHealthPanel .inbox-body {
    display: block !important;
    background: #0a0a0f;
    padding: 1.5rem;
    overflow-y: auto;
}

#emailHealthPanel .inbox-header {
    background: rgba(0, 0, 0, 0.6);
    border-bottom: 1px solid rgba(212, 168, 83, 0.3);
}

#emailHealthPanel .inbox-close-btn {
    background: rgba(239, 68, 68, 0.2);
    border: 1px solid rgba(239, 68, 68, 0.5);
    color: #ef4444;
    padding: 0.5rem;
    border-radius: 8px;
}

#emailHealthPanel .inbox-close-btn:hover {
    background: rgba(239, 68, 68, 0.4);
    color: #fff;
}

/* Ensure tabs are visible in email health panel */
#emailHealthPanel .emailHealthTab {
    background: #1a1a24 !important;
    color: #a0a0a0 !important;
    border: 1px solid rgba(212, 168, 83, 0.3) !important;
    padding: 0.6rem 1.2rem !important;
    font-size: 0.85rem !important;
}

#emailHealthPanel .emailHealthTab:hover {
    color: #D4A853 !important;
    border-color: #D4A853 !important;
}

#emailHealthPanel .emailHealthTab.active {
    background: #D4A853 !important;
    color: #0a0a0f !important;
    border-color: #D4A853 !important;
    font-weight: 600 !important;
}

/* ═══════════════════════════════════════════════════
   AGENT OBSERVATORY
   ═══════════════════════════════════════════════════ */

.agent-obs-fullscreen {
    position: fixed;
    inset: 0;
    background: var(--bg-primary, #0a0b0f);
    z-index: 9100;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.agent-obs-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 24px;
    border-bottom: 1px solid var(--border-subtle, rgba(212,168,83,0.15));
    background: var(--bg-card, rgba(15,17,23,0.85));
    flex-shrink: 0;
}

.agent-obs-header-left {
    display: flex;
    align-items: baseline;
    gap: 12px;
}

.agent-obs-title {
    margin: 0;
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.3rem;
    color: var(--text-primary);
}

.agent-obs-subtitle {
    color: var(--text-muted);
    font-size: 13px;
}

.agent-obs-header-right {
    display: flex;
    align-items: center;
    gap: 8px;
}

.agent-obs-timeframe {
    background: rgba(255,255,255,0.05);
    border: 1px solid var(--border-subtle);
    border-radius: 6px;
    color: var(--text-primary);
    padding: 6px 10px;
    font-size: 13px;
    cursor: pointer;
}

.agent-obs-body {
    flex: 1;
    overflow-y: auto;
    padding: 20px 24px;
}

/* ── Totals Bar ── */

.agent-obs-totals {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin-bottom: 20px;
}

.agent-obs-total-card {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: 10px;
    padding: 16px 20px;
    text-align: center;
}

.agent-obs-total-value {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--gold-primary, #D4A853);
    font-family: 'Space Grotesk', sans-serif;
}

.agent-obs-total-label {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ── Provider Cost Bars ── */

.agent-obs-providers {
    margin-bottom: 20px;
}

.agent-obs-provider-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 10px;
}

.agent-obs-provider-card {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: 8px;
    padding: 12px 16px;
}

.agent-obs-provider-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.agent-obs-provider-label {
    font-weight: 600;
    font-size: 13px;
}

.agent-obs-provider-cost {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 13px;
    color: var(--text-primary);
}

.agent-obs-provider-bar-bg {
    height: 6px;
    background: rgba(255,255,255,0.05);
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 6px;
}

.agent-obs-provider-bar {
    height: 100%;
    border-radius: 3px;
    transition: width 0.4s ease;
}

.agent-obs-provider-meta {
    font-size: 11px;
    color: var(--text-muted);
}

/* ── Tabs ── */

.agent-obs-tabs {
    display: flex;
    gap: 2px;
    margin-bottom: 16px;
    border-bottom: 1px solid var(--border-subtle);
    padding-bottom: 0;
}

.agent-obs-tab {
    background: transparent;
    border: none;
    color: var(--text-muted);
    padding: 10px 20px;
    font-size: 13px;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    transition: all 0.2s;
}

.agent-obs-tab:hover {
    color: var(--text-primary);
}

.agent-obs-tab.active {
    color: var(--gold-primary);
    border-bottom-color: var(--gold-primary);
    font-weight: 600;
}

/* ── Agent Directory (Card Grid) ── */

.agent-obs-domain-section {
    margin-bottom: 24px;
}

.agent-obs-domain-title {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 10px;
    padding-left: 2px;
}

.agent-obs-card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 10px;
}

.agent-obs-card {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: 10px;
    padding: 14px 16px;
    transition: border-color 0.2s;
}

.agent-obs-card:hover {
    border-color: rgba(212,168,83,0.3);
}

.agent-obs-card-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
}

.agent-obs-health-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}

.agent-obs-card-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
}

.agent-obs-card-desc {
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: 10px;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.agent-obs-card-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-bottom: 8px;
}

.agent-obs-model-badge {
    font-size: 11px;
    padding: 2px 8px;
    border-radius: 10px;
    font-family: 'Space Grotesk', sans-serif;
}

.agent-obs-tier-badge {
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 8px;
    background: rgba(255,255,255,0.05);
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.agent-obs-fallback-badge {
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 8px;
    background: rgba(239,68,68,0.1);
    color: rgba(239,68,68,0.7);
}

.agent-obs-card-stats {
    display: flex;
    justify-content: space-between;
    font-size: 11px;
    color: var(--text-muted);
    font-family: 'Space Grotesk', sans-serif;
}

/* ── Live Feed ── */

.agent-obs-feed {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.agent-obs-feed-item {
    display: grid;
    grid-template-columns: 24px 180px 160px 70px 80px 80px 1fr auto;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background: var(--bg-card);
    border: 1px solid rgba(255,255,255,0.03);
    border-radius: 6px;
    font-size: 12px;
    font-family: 'Space Grotesk', sans-serif;
}

.agent-obs-feed-item:hover {
    background: rgba(255,255,255,0.03);
}

.agent-obs-feed-status {
    font-weight: 700;
    text-align: center;
}

.agent-obs-feed-agent {
    color: var(--text-primary);
    font-weight: 500;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-family: inherit;
}

.agent-obs-feed-model {
    font-size: 11px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.agent-obs-feed-latency {
    color: var(--text-secondary);
    text-align: right;
}

.agent-obs-feed-tokens {
    color: var(--text-muted);
    text-align: right;
}

.agent-obs-feed-cost {
    color: var(--gold-primary);
    text-align: right;
}

.agent-obs-feed-time {
    color: var(--text-muted);
    text-align: right;
    font-size: 11px;
}

.agent-obs-feed-fallback {
    background: rgba(239,68,68,0.15);
    color: #f87171;
    padding: 1px 6px;
    border-radius: 4px;
    font-size: 10px;
}

/* ── Performance Table ── */

.agent-obs-perf-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.agent-obs-perf-table th {
    text-align: left;
    padding: 10px 12px;
    color: var(--text-muted);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 1px solid var(--border-subtle);
    font-weight: 600;
}

.agent-obs-perf-table td {
    padding: 10px 12px;
    color: var(--text-secondary);
    border-bottom: 1px solid rgba(255,255,255,0.03);
    font-family: 'Space Grotesk', sans-serif;
    font-size: 12px;
}

.agent-obs-perf-table td:first-child {
    font-family: inherit;
}

.agent-obs-perf-table tr:hover td {
    background: rgba(255,255,255,0.02);
}

/* ── Responsive ── */

@media (max-width: 768px) {
    .agent-obs-totals {
        grid-template-columns: repeat(2, 1fr);
    }
    .agent-obs-card-grid {
        grid-template-columns: 1fr;
    }
    .agent-obs-feed-item {
        grid-template-columns: 24px 1fr auto;
    }
    .agent-obs-feed-model,
    .agent-obs-feed-tokens,
    .agent-obs-feed-cost {
        display: none;
    }
}

/* ═══════════════════════════════════════════════════════════════
   RELATIONSHIP CAMPAIGN MODULE
   ═══════════════════════════════════════════════════════════════ */

/* ── Modal Container ── */
.rc-modal {
    position: fixed;
    inset: 0;
    z-index: 9500;
    background: var(--bg-primary);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.rc-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.5rem;
    background: var(--bg-card);
    border-bottom: 1px solid var(--border-subtle);
    flex-shrink: 0;
}

.rc-modal-header h2 {
    margin: 0;
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.rc-modal-header-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.rc-campaign-selector {
    padding: 0.5rem 1rem;
    background: var(--bg-deep);
    border: 1px solid var(--border-subtle);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 0.85rem;
    cursor: pointer;
}

.rc-campaign-selector:focus {
    outline: none;
    border-color: rgba(236, 72, 153, 0.5);
}

.rc-btn-new-campaign {
    padding: 0.5rem 1rem;
    background: linear-gradient(135deg, #ec4899, #be185d);
    border: none;
    border-radius: 8px;
    color: #fff;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.rc-btn-new-campaign:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(236, 72, 153, 0.3);
}

.rc-close-btn {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255,255,255,0.05);
    border: 1px solid var(--border-subtle);
    border-radius: 8px;
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 1.2rem;
    transition: all 0.2s;
}

.rc-close-btn:hover {
    background: rgba(239, 68, 68, 0.2);
    border-color: rgba(239, 68, 68, 0.4);
    color: #ef4444;
}

/* ── Tab Navigation ── */
.rc-tab-nav {
    display: flex;
    gap: 0;
    background: var(--bg-card);
    border-bottom: 1px solid var(--border-subtle);
    padding: 0 1rem;
    flex-shrink: 0;
    overflow-x: auto;
}

.rc-tab-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.9rem 1.25rem;
    border: none;
    background: none;
    color: var(--text-muted);
    font-size: 0.85rem;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    transition: all 0.2s;
    white-space: nowrap;
}

.rc-tab-btn:hover {
    color: var(--text-primary);
    background: rgba(236, 72, 153, 0.05);
}

.rc-tab-btn.active {
    color: #ec4899;
    border-bottom-color: #ec4899;
}

.rc-tab-btn svg {
    width: 16px;
    height: 16px;
}

.rc-tab-content {
    display: none;
    flex: 1;
    overflow-y: auto;
    padding: 1.5rem;
}

.rc-tab-content.active {
    display: flex;
    flex-direction: column;
}

/* ── Dashboard Tab ── */
.rc-dashboard-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

.rc-dashboard-grid > .rc-card.rc-full-width {
    grid-column: 1 / -1;
}

.rc-card {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: 12px;
    padding: 1.25rem;
}

.rc-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.rc-card-title {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* ── Stage Funnel ── */
.rc-funnel {
    display: flex;
    align-items: stretch;
    gap: 2px;
    height: 80px;
    margin: 1rem 0;
}

.rc-funnel-stage {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
    min-width: 0;
}

.rc-funnel-stage:hover {
    transform: translateY(-2px);
    z-index: 1;
}

.rc-funnel-count {
    font-size: 1.4rem;
    font-weight: 700;
    line-height: 1;
}

.rc-funnel-label {
    font-size: 0.6rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    opacity: 0.8;
    margin-top: 4px;
}

.rc-funnel-stage.stage-unaware {
    background: linear-gradient(135deg, rgba(107, 114, 128, 0.3), rgba(107, 114, 128, 0.15));
    color: #9ca3af;
}
.rc-funnel-stage.stage-researched {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.3), rgba(59, 130, 246, 0.15));
    color: #60a5fa;
}
.rc-funnel-stage.stage-introduced {
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.3), rgba(139, 92, 246, 0.15));
    color: #a78bfa;
}
.rc-funnel-stage.stage-engaged {
    background: linear-gradient(135deg, rgba(236, 72, 153, 0.3), rgba(236, 72, 153, 0.15));
    color: #f472b6;
}
.rc-funnel-stage.stage-rapport {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.3), rgba(245, 158, 11, 0.15));
    color: #fbbf24;
}
.rc-funnel-stage.stage-trusted {
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.3), rgba(34, 197, 94, 0.15));
    color: #4ade80;
}
.rc-funnel-stage.stage-advocate {
    background: linear-gradient(135deg, rgba(212, 168, 85, 0.3), rgba(212, 168, 85, 0.15));
    color: var(--gold-primary);
}

/* ── Stage Badges ── */
.rc-stage-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.2rem 0.6rem;
    border-radius: 999px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.rc-stage-badge.stage-unaware { background: rgba(107,114,128,0.2); color: #9ca3af; }
.rc-stage-badge.stage-researched { background: rgba(59,130,246,0.2); color: #60a5fa; }
.rc-stage-badge.stage-introduced { background: rgba(139,92,246,0.2); color: #a78bfa; }
.rc-stage-badge.stage-engaged { background: rgba(236,72,153,0.2); color: #f472b6; }
.rc-stage-badge.stage-rapport { background: rgba(245,158,11,0.2); color: #fbbf24; }
.rc-stage-badge.stage-trusted { background: rgba(34,197,94,0.2); color: #4ade80; }
.rc-stage-badge.stage-advocate { background: rgba(212,168,85,0.2); color: var(--gold-primary); }

/* ── Engagement Score Ring ── */
.rc-engagement-ring {
    position: relative;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.rc-engagement-ring svg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    transform: rotate(-90deg);
}

.rc-engagement-ring .ring-bg {
    fill: none;
    stroke: rgba(255,255,255,0.06);
    stroke-width: 4;
}

.rc-engagement-ring .ring-fill {
    fill: none;
    stroke-width: 4;
    stroke-linecap: round;
    transition: stroke-dashoffset 0.6s ease;
}

.rc-engagement-ring .ring-fill.score-low { stroke: #6b7280; }
.rc-engagement-ring .ring-fill.score-medium { stroke: #3b82f6; }
.rc-engagement-ring .ring-fill.score-high { stroke: #f59e0b; }
.rc-engagement-ring .ring-fill.score-excellent { stroke: #22c55e; }

.rc-engagement-value {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-primary);
    z-index: 1;
}

/* ── Dossier Layout ── */
.rc-dossier-layout {
    display: grid;
    grid-template-columns: 320px 1fr;
    gap: 0;
    flex: 1;
    overflow: hidden;
    margin: -1.5rem;
    min-height: 0;
}

.rc-dossier-sidebar {
    background: var(--bg-card);
    border-right: 1px solid var(--border-subtle);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.rc-dossier-sidebar-header {
    padding: 1rem;
    border-bottom: 1px solid var(--border-subtle);
    flex-shrink: 0;
}

.rc-dossier-search {
    width: 100%;
    padding: 0.6rem 0.75rem;
    background: var(--bg-deep);
    border: 1px solid var(--border-subtle);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 0.85rem;
}

.rc-dossier-search:focus {
    outline: none;
    border-color: rgba(236, 72, 153, 0.5);
}

.rc-dossier-filters {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.75rem;
}

.rc-dossier-filter {
    flex: 1;
    padding: 0.4rem;
    background: var(--bg-deep);
    border: 1px solid var(--border-subtle);
    border-radius: 6px;
    color: var(--text-secondary);
    font-size: 0.75rem;
}

.rc-dossier-filter:focus {
    outline: none;
    border-color: rgba(236, 72, 153, 0.5);
}

.rc-contact-list {
    flex: 1;
    overflow-y: auto;
}

.rc-contact-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid rgba(255,255,255,0.03);
    cursor: pointer;
    transition: all 0.15s;
}

.rc-contact-item:hover {
    background: rgba(236, 72, 153, 0.05);
}

.rc-contact-item.active {
    background: rgba(236, 72, 153, 0.1);
    border-left: 3px solid #ec4899;
}

.rc-contact-avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.85rem;
    background: linear-gradient(135deg, rgba(236, 72, 153, 0.3), rgba(139, 92, 246, 0.3));
    color: #f472b6;
    flex-shrink: 0;
}

.rc-contact-info {
    flex: 1;
    min-width: 0;
}

.rc-contact-name {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.rc-contact-org {
    font-size: 0.72rem;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.rc-contact-score-mini {
    font-size: 0.75rem;
    font-weight: 700;
    padding: 0.15rem 0.4rem;
    border-radius: 4px;
    background: rgba(255,255,255,0.05);
}

.rc-contact-score-mini.score-low { color: #6b7280; }
.rc-contact-score-mini.score-medium { color: #3b82f6; }
.rc-contact-score-mini.score-high { color: #f59e0b; }
.rc-contact-score-mini.score-excellent { color: #22c55e; }

/* ── Dossier Main Panel ── */
.rc-dossier-main {
    overflow-y: auto;
    padding: 1.5rem;
}

.rc-dossier-header {
    display: flex;
    align-items: flex-start;
    gap: 1.25rem;
    margin-bottom: 1.5rem;
}

.rc-dossier-avatar-lg {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.5rem;
    background: linear-gradient(135deg, rgba(236, 72, 153, 0.3), rgba(139, 92, 246, 0.3));
    color: #f472b6;
    flex-shrink: 0;
}

.rc-dossier-identity {
    flex: 1;
}

.rc-dossier-name {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

.rc-dossier-title {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.rc-dossier-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    font-size: 0.78rem;
    color: var(--text-muted);
}

.rc-dossier-meta span {
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.rc-dossier-actions {
    display: flex;
    gap: 0.5rem;
    flex-shrink: 0;
}

.rc-action-btn {
    padding: 0.5rem 0.85rem;
    border-radius: 8px;
    font-size: 0.78rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 0.3rem;
    border: 1px solid var(--border-subtle);
    background: rgba(255,255,255,0.05);
    color: var(--text-secondary);
}

.rc-action-btn:hover {
    border-color: rgba(236, 72, 153, 0.4);
    background: rgba(236, 72, 153, 0.1);
    color: #ec4899;
}

.rc-action-btn.primary {
    background: linear-gradient(135deg, #ec4899, #be185d);
    border-color: transparent;
    color: #fff;
}

.rc-action-btn.primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(236, 72, 153, 0.3);
}

/* ── Dossier Sections (Collapsible) ── */
.rc-dossier-section {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: 10px;
    margin-bottom: 1rem;
    overflow: hidden;
}

.rc-dossier-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.85rem 1rem;
    cursor: pointer;
    transition: background 0.15s;
}

.rc-dossier-section-header:hover {
    background: rgba(255,255,255,0.02);
}

.rc-dossier-section-title {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.rc-dossier-section-toggle {
    color: var(--text-muted);
    transition: transform 0.2s;
    font-size: 0.8rem;
}

.rc-dossier-section.collapsed .rc-dossier-section-toggle {
    transform: rotate(-90deg);
}

.rc-dossier-section-body {
    padding: 0 1rem 1rem;
    font-size: 0.85rem;
    line-height: 1.6;
    color: var(--text-secondary);
}

.rc-dossier-section.collapsed .rc-dossier-section-body {
    display: none;
}

/* ── Bridge Contact (Gatekeeper) Card ── */
.rc-bridge-contact {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    background: rgba(139, 92, 246, 0.08);
    border: 1px solid rgba(139, 92, 246, 0.2);
    border-radius: 8px;
    margin-bottom: 0.5rem;
}

.rc-bridge-contact-icon {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(139, 92, 246, 0.2);
    color: #a78bfa;
    font-size: 0.85rem;
    flex-shrink: 0;
}

.rc-bridge-contact-info {
    flex: 1;
    min-width: 0;
}

.rc-bridge-contact-name {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-primary);
}

.rc-bridge-contact-role {
    font-size: 0.7rem;
    color: #a78bfa;
}

.rc-bridge-badge {
    padding: 0.15rem 0.5rem;
    border-radius: 999px;
    font-size: 0.6rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    background: rgba(139, 92, 246, 0.2);
    color: #a78bfa;
}

/* ── Interaction Timeline ── */
.rc-timeline {
    position: relative;
    padding-left: 1.5rem;
}

.rc-timeline::before {
    content: '';
    position: absolute;
    left: 7px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--border-subtle);
}

.rc-timeline-item {
    position: relative;
    padding-bottom: 1.25rem;
    padding-left: 1rem;
}

.rc-timeline-item:last-child {
    padding-bottom: 0;
}

.rc-timeline-dot {
    position: absolute;
    left: -1.5rem;
    top: 3px;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    border: 2px solid var(--border-subtle);
    background: var(--bg-primary);
    z-index: 1;
}

.rc-timeline-dot.type-email_sent { border-color: #3b82f6; background: rgba(59,130,246,0.2); }
.rc-timeline-dot.type-email_opened { border-color: #22c55e; background: rgba(34,197,94,0.2); }
.rc-timeline-dot.type-reply_received { border-color: #ec4899; background: rgba(236,72,153,0.2); }
.rc-timeline-dot.type-research_completed { border-color: #8b5cf6; background: rgba(139,92,246,0.2); }
.rc-timeline-dot.type-stage_change { border-color: #f59e0b; background: rgba(245,158,11,0.2); }
.rc-timeline-dot.type-note_added { border-color: #6b7280; background: rgba(107,114,128,0.2); }

.rc-timeline-content {
    font-size: 0.82rem;
    color: var(--text-secondary);
}

.rc-timeline-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.2rem;
}

.rc-timeline-type {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.8rem;
}

.rc-timeline-time {
    font-size: 0.7rem;
    color: var(--text-muted);
}

.rc-timeline-detail {
    font-size: 0.78rem;
    color: var(--text-muted);
    line-height: 1.5;
}

/* ── Wave Cards ── */
.rc-waves-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 1rem;
}

.rc-wave-card {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: 12px;
    padding: 1.25rem;
    transition: all 0.2s;
}

.rc-wave-card:hover {
    border-color: rgba(236, 72, 153, 0.3);
}

.rc-wave-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.rc-wave-name {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-primary);
}

.rc-wave-status {
    padding: 0.2rem 0.6rem;
    border-radius: 999px;
    font-size: 0.68rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.rc-wave-status.status-pending { background: rgba(107,114,128,0.2); color: #9ca3af; }
.rc-wave-status.status-researching { background: rgba(139,92,246,0.2); color: #a78bfa; }
.rc-wave-status.status-drafting { background: rgba(59,130,246,0.2); color: #60a5fa; }
.rc-wave-status.status-reviewing { background: rgba(245,158,11,0.2); color: #fbbf24; }
.rc-wave-status.status-sending { background: rgba(236,72,153,0.2); color: #f472b6; }
.rc-wave-status.status-monitoring { background: rgba(34,197,94,0.2); color: #4ade80; }
.rc-wave-status.status-complete { background: rgba(212,168,85,0.2); color: var(--gold-primary); }

.rc-wave-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.rc-wave-stat {
    text-align: center;
    padding: 0.4rem;
    background: var(--bg-deep);
    border-radius: 6px;
}

.rc-wave-stat-value {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-primary);
}

.rc-wave-stat-label {
    font-size: 0.6rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
}

.rc-wave-progress {
    height: 6px;
    background: var(--bg-deep);
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 0.75rem;
}

.rc-wave-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #ec4899, #8b5cf6);
    border-radius: 3px;
    transition: width 0.4s ease;
}

.rc-wave-actions {
    display: flex;
    gap: 0.5rem;
}

.rc-wave-action-btn {
    flex: 1;
    padding: 0.5rem;
    border: 1px solid var(--border-subtle);
    border-radius: 6px;
    background: rgba(255,255,255,0.03);
    color: var(--text-secondary);
    font-size: 0.75rem;
    cursor: pointer;
    transition: all 0.2s;
    text-align: center;
}

.rc-wave-action-btn:hover {
    border-color: rgba(236, 72, 153, 0.4);
    color: #ec4899;
}

.rc-wave-action-btn.primary {
    background: linear-gradient(135deg, #ec4899, #be185d);
    border-color: transparent;
    color: #fff;
}

/* ── Draft Cards ── */
.rc-drafts-toolbar {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: 10px;
    margin-bottom: 1rem;
    flex-shrink: 0;
}

.rc-drafts-filter {
    padding: 0.4rem 0.75rem;
    background: var(--bg-deep);
    border: 1px solid var(--border-subtle);
    border-radius: 6px;
    color: var(--text-secondary);
    font-size: 0.8rem;
}

.rc-drafts-filter:focus {
    outline: none;
    border-color: rgba(236, 72, 153, 0.5);
}

.rc-drafts-spacer {
    flex: 1;
}

.rc-batch-approve-btn {
    padding: 0.4rem 0.85rem;
    background: linear-gradient(135deg, #22c55e, #16a34a);
    border: none;
    border-radius: 6px;
    color: #fff;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.rc-batch-approve-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 3px 10px rgba(34, 197, 94, 0.3);
}

.rc-drafts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(400px, 1fr));
    gap: 1rem;
    flex: 1;
    overflow-y: auto;
}

.rc-draft-card {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.2s;
}

.rc-draft-card:hover {
    border-color: rgba(236, 72, 153, 0.3);
}

.rc-draft-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.85rem 1rem;
    border-bottom: 1px solid rgba(255,255,255,0.03);
}

.rc-draft-contact {
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.rc-draft-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.75rem;
    background: linear-gradient(135deg, rgba(236, 72, 153, 0.3), rgba(139, 92, 246, 0.3));
    color: #f472b6;
}

.rc-draft-contact-name {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-primary);
}

.rc-draft-contact-org {
    font-size: 0.7rem;
    color: var(--text-muted);
}

.rc-draft-status {
    padding: 0.15rem 0.5rem;
    border-radius: 999px;
    font-size: 0.65rem;
    font-weight: 600;
    text-transform: uppercase;
}

.rc-draft-status.status-generated { background: rgba(59,130,246,0.2); color: #60a5fa; }
.rc-draft-status.status-edited { background: rgba(245,158,11,0.2); color: #fbbf24; }
.rc-draft-status.status-approved { background: rgba(34,197,94,0.2); color: #4ade80; }
.rc-draft-status.status-sent { background: rgba(107,114,128,0.2); color: #9ca3af; }

.rc-draft-body {
    padding: 1rem;
    max-height: 200px;
    overflow-y: auto;
}

.rc-draft-subject {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.rc-draft-preview {
    font-size: 0.8rem;
    color: var(--text-secondary);
    line-height: 1.6;
    white-space: pre-wrap;
}

.rc-draft-hooks {
    display: flex;
    flex-wrap: wrap;
    gap: 0.3rem;
    padding: 0 1rem 0.75rem;
}

.rc-draft-hook {
    padding: 0.15rem 0.5rem;
    border-radius: 4px;
    font-size: 0.65rem;
    background: rgba(236, 72, 153, 0.1);
    color: #f472b6;
    border: 1px solid rgba(236, 72, 153, 0.2);
}

.rc-draft-card-footer {
    display: flex;
    gap: 0;
    border-top: 1px solid rgba(255,255,255,0.03);
}

.rc-draft-action {
    flex: 1;
    padding: 0.6rem;
    border: none;
    background: none;
    color: var(--text-muted);
    font-size: 0.75rem;
    cursor: pointer;
    transition: all 0.15s;
    text-align: center;
}

.rc-draft-action:hover {
    background: rgba(255,255,255,0.03);
    color: var(--text-primary);
}

.rc-draft-action.approve:hover { color: #22c55e; }
.rc-draft-action.reject:hover { color: #ef4444; }
.rc-draft-action.edit:hover { color: #3b82f6; }
.rc-draft-action.regenerate:hover { color: #8b5cf6; }

/* ── Response Center ── */
.rc-response-layout {
    display: grid;
    grid-template-columns: 1fr 350px;
    gap: 1rem;
    flex: 1;
    overflow: hidden;
    margin: -1.5rem;
}

.rc-response-list {
    overflow-y: auto;
    padding: 1.5rem;
}

.rc-response-card {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: 10px;
    padding: 1rem;
    margin-bottom: 0.75rem;
    cursor: pointer;
    transition: all 0.2s;
}

.rc-response-card:hover {
    border-color: rgba(236, 72, 153, 0.3);
}

.rc-response-card.active {
    border-color: #ec4899;
    box-shadow: 0 0 0 1px rgba(236, 72, 153, 0.3);
}

.rc-response-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.5rem;
}

.rc-response-from {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-primary);
}

.rc-response-time {
    font-size: 0.7rem;
    color: var(--text-muted);
}

.rc-response-preview {
    font-size: 0.8rem;
    color: var(--text-secondary);
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.rc-response-sentiment {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.15rem 0.5rem;
    border-radius: 999px;
    font-size: 0.65rem;
    font-weight: 600;
    text-transform: uppercase;
    margin-top: 0.5rem;
}

.rc-response-sentiment.positive { background: rgba(34,197,94,0.2); color: #4ade80; }
.rc-response-sentiment.neutral { background: rgba(59,130,246,0.2); color: #60a5fa; }
.rc-response-sentiment.cautious { background: rgba(245,158,11,0.2); color: #fbbf24; }
.rc-response-sentiment.negative { background: rgba(239,68,68,0.2); color: #f87171; }

.rc-response-context {
    background: var(--bg-card);
    border-left: 1px solid var(--border-subtle);
    padding: 1.5rem;
    overflow-y: auto;
}

/* ── Analytics ── */
.rc-analytics-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.rc-stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: 10px;
    padding: 1rem;
    text-align: center;
}

.rc-stat-value {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

.rc-stat-label {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
}

.rc-stat-change {
    font-size: 0.75rem;
    margin-top: 0.3rem;
}

.rc-stat-change.positive { color: #22c55e; }
.rc-stat-change.negative { color: #ef4444; }

.rc-charts-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

/* ── Follow-up Queue ── */
.rc-followup-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.6rem 0;
    border-bottom: 1px solid rgba(255,255,255,0.03);
}

.rc-followup-item:last-child {
    border-bottom: none;
}

.rc-followup-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.72rem;
    background: linear-gradient(135deg, rgba(236, 72, 153, 0.2), rgba(139, 92, 246, 0.2));
    color: #f472b6;
    flex-shrink: 0;
}

.rc-followup-info {
    flex: 1;
    min-width: 0;
}

.rc-followup-name {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-primary);
}

.rc-followup-type {
    font-size: 0.7rem;
    color: var(--text-muted);
}

.rc-followup-due {
    font-size: 0.72rem;
    font-weight: 600;
    padding: 0.15rem 0.5rem;
    border-radius: 4px;
}

.rc-followup-due.overdue { background: rgba(239,68,68,0.15); color: #f87171; }
.rc-followup-due.today { background: rgba(245,158,11,0.15); color: #fbbf24; }
.rc-followup-due.upcoming { background: rgba(34,197,94,0.15); color: #4ade80; }

/* ── Create Campaign Overlay ── */
.rc-create-overlay {
    position: fixed;
    inset: 0;
    z-index: 9600;
    background: rgba(0,0,0,0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(4px);
}

.rc-create-modal {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: 16px;
    width: 480px;
    max-width: 90vw;
    padding: 2rem;
    box-shadow: 0 20px 60px rgba(0,0,0,0.4);
}

.rc-create-modal h3 {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.2rem;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.rc-form-group {
    margin-bottom: 1.25rem;
}

.rc-form-label {
    display: block;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 0.4rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.rc-form-input {
    width: 100%;
    padding: 0.6rem 0.85rem;
    background: var(--bg-deep);
    border: 1px solid var(--border-subtle);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 0.9rem;
}

.rc-form-input:focus {
    outline: none;
    border-color: rgba(236, 72, 153, 0.5);
}

.rc-form-textarea {
    width: 100%;
    padding: 0.6rem 0.85rem;
    background: var(--bg-deep);
    border: 1px solid var(--border-subtle);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 0.85rem;
    resize: vertical;
    min-height: 80px;
}

.rc-form-textarea:focus {
    outline: none;
    border-color: rgba(236, 72, 153, 0.5);
}

.rc-form-select {
    width: 100%;
    padding: 0.6rem 0.85rem;
    background: var(--bg-deep);
    border: 1px solid var(--border-subtle);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 0.85rem;
    cursor: pointer;
}

.rc-form-select:focus {
    outline: none;
    border-color: rgba(236, 72, 153, 0.5);
}

.rc-create-actions {
    display: flex;
    gap: 0.75rem;
    justify-content: flex-end;
    margin-top: 1.5rem;
}

.rc-create-cancel {
    padding: 0.55rem 1.25rem;
    background: rgba(255,255,255,0.05);
    border: 1px solid var(--border-subtle);
    border-radius: 8px;
    color: var(--text-secondary);
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s;
}

.rc-create-cancel:hover {
    border-color: rgba(239, 68, 68, 0.4);
    color: #ef4444;
}

.rc-create-submit {
    padding: 0.55rem 1.25rem;
    background: linear-gradient(135deg, #ec4899, #be185d);
    border: none;
    border-radius: 8px;
    color: #fff;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.rc-create-submit:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(236, 72, 153, 0.3);
}

/* ── Empty States ── */
.rc-empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem;
    text-align: center;
    color: var(--text-muted);
    flex: 1;
}

.rc-empty-state svg {
    width: 48px;
    height: 48px;
    margin-bottom: 1rem;
    opacity: 0.4;
}

.rc-empty-state h3 {
    font-size: 1rem;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.rc-empty-state p {
    font-size: 0.85rem;
    max-width: 400px;
    line-height: 1.6;
}

/* ── Loading & Progress ── */
.rc-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    color: var(--text-muted);
    font-size: 0.85rem;
    gap: 0.5rem;
}

.rc-progress-bar {
    height: 4px;
    background: var(--bg-deep);
    border-radius: 2px;
    overflow: hidden;
    margin: 0.5rem 0;
}

.rc-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #ec4899, #8b5cf6);
    border-radius: 2px;
    transition: width 0.3s ease;
}

/* ── Responsive ── */
@media (max-width: 1024px) {
    .rc-dossier-layout {
        grid-template-columns: 280px 1fr;
    }
    .rc-response-layout {
        grid-template-columns: 1fr;
    }
    .rc-analytics-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .rc-dashboard-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .rc-dossier-layout {
        grid-template-columns: 1fr;
    }
    .rc-dossier-sidebar {
        max-height: 300px;
    }
    .rc-waves-grid {
        grid-template-columns: 1fr;
    }
    .rc-drafts-grid {
        grid-template-columns: 1fr;
    }
    .rc-funnel {
        flex-wrap: wrap;
        height: auto;
    }
    .rc-funnel-stage {
        min-width: calc(25% - 2px);
        padding: 0.5rem;
    }
    .rc-tab-nav {
        gap: 0;
    }
    .rc-tab-btn {
        padding: 0.7rem 0.75rem;
        font-size: 0.75rem;
    }
    .rc-tab-btn svg {
        display: none;
    }
}

/* ── RC Dynamic Modal Styles (JS-generated markup) ── */
.rc-modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 9500;
    background: rgba(0,0,0,0.85);
    display: none;
    backdrop-filter: blur(4px);
}

.rc-modal-overlay.active {
    display: block;
}

.rc-modal-overlay .rc-modal {
    position: absolute;
    inset: 0;
    background: var(--bg-primary);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.rc-modal .rc-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.5rem;
    background: var(--bg-card);
    border-bottom: 1px solid var(--border-subtle);
    flex-shrink: 0;
}

.rc-modal .rc-header-left {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.rc-modal .rc-title {
    margin: 0;
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.2rem;
    color: var(--text-primary);
}

.rc-campaign-select {
    padding: 0.45rem 0.85rem;
    background: var(--bg-deep);
    border: 1px solid var(--border-subtle);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 0.85rem;
    cursor: pointer;
}

.rc-campaign-select:focus {
    outline: none;
    border-color: rgba(236, 72, 153, 0.5);
}

/* RC Button System */
.rc-btn {
    padding: 0.5rem 1rem;
    border: 1px solid var(--border-subtle);
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    background: rgba(255,255,255,0.05);
    color: var(--text-secondary);
}

.rc-btn:hover {
    border-color: rgba(236, 72, 153, 0.4);
    background: rgba(236, 72, 153, 0.1);
}

.rc-btn.rc-btn-gold {
    background: linear-gradient(135deg, var(--gold-primary), #c9963c);
    border-color: transparent;
    color: #1a1a2e;
}

.rc-btn.rc-btn-gold:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(212, 168, 85, 0.3);
}

.rc-btn.rc-btn-secondary {
    background: rgba(255,255,255,0.05);
    border: 1px solid var(--border-subtle);
    color: var(--text-secondary);
}

.rc-btn.rc-btn-secondary:hover {
    border-color: var(--text-muted);
    color: var(--text-primary);
}

.rc-btn.rc-btn-accent {
    background: linear-gradient(135deg, #ec4899, #be185d);
    border-color: transparent;
    color: #fff;
}

.rc-btn.rc-btn-accent:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(236, 72, 153, 0.3);
}

.rc-btn.rc-btn-danger {
    background: rgba(239, 68, 68, 0.15);
    border-color: rgba(239, 68, 68, 0.3);
    color: #f87171;
}

.rc-btn.rc-btn-danger:hover {
    background: rgba(239, 68, 68, 0.25);
}

.rc-btn.rc-btn-sm {
    padding: 0.3rem 0.65rem;
    font-size: 0.75rem;
    border-radius: 6px;
}

.rc-btn[disabled] {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}

/* RC Nav Tabs */
.rc-modal .rc-nav-tabs {
    display: flex;
    gap: 0;
    background: var(--bg-card);
    border-bottom: 1px solid var(--border-subtle);
    padding: 0 1rem;
    flex-shrink: 0;
    overflow-x: auto;
}

.rc-nav-tab {
    padding: 0.8rem 1.15rem;
    border: none;
    background: none;
    color: var(--text-muted);
    font-size: 0.85rem;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    transition: all 0.2s;
    white-space: nowrap;
}

.rc-nav-tab:hover {
    color: var(--text-primary);
    background: rgba(236, 72, 153, 0.05);
}

.rc-nav-tab.active {
    color: #ec4899;
    border-bottom-color: #ec4899;
}

/* RC Tab Panel */
.rc-tab-panel {
    flex: 1;
    overflow-y: auto;
    padding: 1.5rem;
}

/* RC Form Elements */
.rc-search-input,
.rc-input {
    width: 100%;
    padding: 0.6rem 0.85rem;
    background: var(--bg-deep);
    border: 1px solid var(--border-subtle);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 0.85rem;
}

.rc-search-input:focus,
.rc-input:focus {
    outline: none;
    border-color: rgba(236, 72, 153, 0.5);
}

.rc-textarea {
    width: 100%;
    padding: 0.6rem 0.85rem;
    background: var(--bg-deep);
    border: 1px solid var(--border-subtle);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 0.85rem;
    resize: vertical;
    min-height: 80px;
    font-family: inherit;
}

.rc-textarea:focus {
    outline: none;
    border-color: rgba(236, 72, 153, 0.5);
}

.rc-select {
    width: 100%;
    padding: 0.6rem 0.85rem;
    background: var(--bg-deep);
    border: 1px solid var(--border-subtle);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 0.85rem;
    cursor: pointer;
}

.rc-select:focus {
    outline: none;
    border-color: rgba(236, 72, 153, 0.5);
}

.rc-form-actions {
    display: flex;
    gap: 0.75rem;
    justify-content: flex-end;
    margin-top: 1.5rem;
}

/* RC Create Campaign Card */
.rc-create-card {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: 16px;
    padding: 2rem;
    max-width: 480px;
    margin: 0 auto;
    box-shadow: 0 20px 60px rgba(0,0,0,0.4);
}

.rc-create-card h2,
.rc-create-card h3 {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.2rem;
    margin-bottom: 1.5rem;
}

/* RC Inline Form Group */
.rc-form-group {
    margin-bottom: 1.25rem;
}

.rc-form-group label {
    display: block;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 0.4rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* RC Drafts list */
.rc-drafts-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(400px, 1fr));
    gap: 1rem;
    flex: 1;
    overflow-y: auto;
}

/* RC Responses list */
.rc-responses-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

/* ============================================================
   CONTENT STUDIO (.cs-*) — Visual Content Creation Engine
   ============================================================ */

/* ── Modal Overlay ── */
.cs-modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 9600;
    background: rgba(0,0,0,0.9);
    display: none;
    align-items: center;
    justify-content: center;
}
.cs-modal-overlay.active {
    display: flex;
}
.cs-modal {
    width: 98vw;
    height: 96vh;
    background: var(--bg-primary, #0a0a0f);
    border: 1px solid rgba(6, 182, 212, 0.3);
    border-radius: 16px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* ── Modal Header ── */
.cs-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1.25rem;
    background: linear-gradient(135deg, rgba(6, 182, 212, 0.12), rgba(6, 182, 212, 0.03));
    border-bottom: 1px solid rgba(6, 182, 212, 0.2);
    flex-shrink: 0;
}
.cs-modal-title {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.1rem;
    color: #06B6D4;
    letter-spacing: 0.05em;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.cs-modal-title svg {
    width: 20px;
    height: 20px;
    stroke: #06B6D4;
}
.cs-header-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.cs-close-btn {
    background: none;
    border: 1px solid rgba(255,255,255,0.1);
    color: var(--text-muted);
    width: 32px;
    height: 32px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}
.cs-close-btn:hover {
    border-color: rgba(239, 68, 68, 0.5);
    color: #ef4444;
}

/* ── Tab Navigation ── */
.cs-tab-nav {
    display: flex;
    border-bottom: 1px solid var(--border-subtle);
    padding: 0 1rem;
    flex-shrink: 0;
    background: rgba(0,0,0,0.3);
}
.cs-tab-btn {
    padding: 0.6rem 1.25rem;
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    color: var(--text-muted);
    font-size: 0.8rem;
    font-family: 'Space Grotesk', sans-serif;
    letter-spacing: 0.04em;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}
.cs-tab-btn:hover {
    color: var(--text-secondary);
}
.cs-tab-btn.active {
    color: #06B6D4;
    border-bottom-color: #06B6D4;
}
.cs-tab-content {
    flex: 1;
    overflow: hidden;
    display: flex;
}
.cs-tab-panel {
    display: none;
    width: 100%;
    height: 100%;
    overflow: hidden;
}
.cs-tab-panel.active {
    display: flex;
    flex-direction: column;
}

/* ── Buttons ── */
.cs-btn {
    padding: 0.45rem 1rem;
    border-radius: 8px;
    font-size: 0.8rem;
    font-family: 'Space Grotesk', sans-serif;
    letter-spacing: 0.03em;
    cursor: pointer;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    border: none;
}
.cs-btn-primary {
    background: linear-gradient(135deg, #06B6D4, #0891B2);
    color: #fff;
}
.cs-btn-primary:hover {
    background: linear-gradient(135deg, #22D3EE, #06B6D4);
    box-shadow: 0 0 12px rgba(6, 182, 212, 0.3);
}
.cs-btn-secondary {
    background: rgba(255,255,255,0.05);
    border: 1px solid var(--border-subtle);
    color: var(--text-secondary);
}
.cs-btn-secondary:hover {
    background: rgba(255,255,255,0.1);
    border-color: rgba(6, 182, 212, 0.3);
    color: #06B6D4;
}
.cs-btn-gold {
    background: linear-gradient(135deg, #D4A853, #B8922E);
    color: #1a1a2e;
}
.cs-btn-gold:hover {
    box-shadow: 0 0 12px rgba(212, 168, 83, 0.3);
}
.cs-btn-danger {
    background: rgba(239, 68, 68, 0.15);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #ef4444;
}
.cs-btn-danger:hover {
    background: rgba(239, 68, 68, 0.25);
}
.cs-btn-sm {
    padding: 0.3rem 0.7rem;
    font-size: 0.7rem;
}
.cs-btn-icon {
    width: 32px;
    height: 32px;
    padding: 0;
    justify-content: center;
    border-radius: 8px;
    background: rgba(255,255,255,0.05);
    border: 1px solid var(--border-subtle);
    color: var(--text-muted);
}
.cs-btn-icon:hover {
    border-color: rgba(6, 182, 212, 0.3);
    color: #06B6D4;
}

/* ── Projects Tab ── */
.cs-projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1rem;
    padding: 1.25rem;
    overflow-y: auto;
}
.cs-project-card {
    background: var(--bg-card, #1a1a2e);
    border: 1px solid var(--border-subtle);
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.2s;
}
.cs-project-card:hover {
    border-color: rgba(6, 182, 212, 0.4);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.3);
}
.cs-project-thumbnail {
    width: 100%;
    aspect-ratio: 16/9;
    background: linear-gradient(135deg, #0a0a0f, #1a1a2e);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    font-size: 2.5rem;
    border-bottom: 1px solid var(--border-subtle);
    position: relative;
}
.cs-project-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.cs-project-info {
    padding: 0.75rem;
}
.cs-project-name {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}
.cs-project-meta {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.7rem;
    color: var(--text-muted);
}
.cs-project-badge {
    padding: 0.15rem 0.5rem;
    border-radius: 10px;
    font-size: 0.65rem;
    font-weight: 500;
    letter-spacing: 0.03em;
}
.cs-project-badge.showcase { background: rgba(6, 182, 212, 0.15); color: #06B6D4; }
.cs-project-badge.demo { background: rgba(168, 85, 247, 0.15); color: #A855F7; }
.cs-project-badge.explainer { background: rgba(34, 197, 94, 0.15); color: #22C55E; }
.cs-project-badge.mockup { background: rgba(249, 115, 22, 0.15); color: #F97316; }
.cs-project-badge.custom { background: rgba(212, 168, 83, 0.15); color: #D4A853; }

/* ── New Project Card ── */
.cs-new-project-card {
    background: transparent;
    border: 2px dashed rgba(6, 182, 212, 0.2);
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
    min-height: 200px;
    gap: 0.5rem;
    color: var(--text-muted);
}
.cs-new-project-card:hover {
    border-color: rgba(6, 182, 212, 0.5);
    background: rgba(6, 182, 212, 0.05);
    color: #06B6D4;
}
.cs-new-project-icon {
    font-size: 2rem;
    opacity: 0.6;
}

/* ── Editor Layout (4-panel) ── */
.cs-editor-layout {
    display: grid;
    grid-template-columns: 220px 1fr 280px;
    grid-template-rows: 1fr auto;
    height: 100%;
    overflow: hidden;
}

/* Left Panel: Scenes + Layers */
.cs-left-panel {
    grid-row: 1 / 3;
    border-right: 1px solid var(--border-subtle);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: rgba(0,0,0,0.2);
}
.cs-panel-header {
    padding: 0.6rem 0.75rem;
    font-size: 0.7rem;
    font-family: 'Space Grotesk', sans-serif;
    color: #06B6D4;
    letter-spacing: 0.08em;
    border-bottom: 1px solid var(--border-subtle);
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.cs-panel-header button {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 1rem;
    padding: 0;
    transition: color 0.2s;
}
.cs-panel-header button:hover {
    color: #06B6D4;
}

/* Scene List */
.cs-scene-list {
    flex: 1;
    overflow-y: auto;
    padding: 0.4rem;
}
.cs-scene-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.15s;
    margin-bottom: 0.25rem;
}
.cs-scene-item:hover {
    background: rgba(255,255,255,0.05);
}
.cs-scene-item.active {
    background: rgba(6, 182, 212, 0.12);
    border: 1px solid rgba(6, 182, 212, 0.25);
}
.cs-scene-thumb {
    width: 48px;
    height: 27px;
    border-radius: 4px;
    background: linear-gradient(135deg, #0a0a0f, #1a1a2e);
    flex-shrink: 0;
    overflow: hidden;
}
.cs-scene-thumb img, .cs-scene-thumb canvas {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.cs-scene-info {
    flex: 1;
    min-width: 0;
}
.cs-scene-name {
    font-size: 0.75rem;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.cs-scene-duration {
    font-size: 0.65rem;
    color: var(--text-muted);
}

/* Layer List */
.cs-layer-list {
    flex: 1;
    overflow-y: auto;
    padding: 0.4rem;
}
.cs-layer-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.4rem 0.5rem;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.15s;
    margin-bottom: 0.2rem;
    font-size: 0.75rem;
    color: var(--text-secondary);
}
.cs-layer-item:hover {
    background: rgba(255,255,255,0.05);
}
.cs-layer-item.active {
    background: rgba(6, 182, 212, 0.12);
    color: #06B6D4;
}
.cs-layer-icon {
    width: 18px;
    text-align: center;
    font-size: 0.8rem;
    flex-shrink: 0;
}
.cs-layer-name {
    flex: 1;
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.cs-layer-visibility {
    opacity: 0.4;
    cursor: pointer;
    transition: opacity 0.2s;
}
.cs-layer-visibility:hover {
    opacity: 1;
}

/* Center: Canvas Preview */
.cs-canvas-area {
    display: flex;
    align-items: center;
    justify-content: center;
    background: #050508;
    position: relative;
    overflow: hidden;
}
.cs-canvas-wrapper {
    position: relative;
    box-shadow: 0 4px 24px rgba(0,0,0,0.5);
    border-radius: 4px;
    overflow: hidden;
}
.cs-canvas-wrapper canvas {
    display: block;
}

/* Timeline Scrubber */
.cs-timeline {
    grid-column: 2 / 3;
    border-top: 1px solid var(--border-subtle);
    background: rgba(0,0,0,0.3);
    padding: 0.5rem 1rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}
.cs-playback-controls {
    display: flex;
    align-items: center;
    gap: 0.35rem;
}
.cs-play-btn {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: rgba(6, 182, 212, 0.2);
    border: 1px solid rgba(6, 182, 212, 0.4);
    color: #06B6D4;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
}
.cs-play-btn:hover {
    background: rgba(6, 182, 212, 0.3);
    box-shadow: 0 0 8px rgba(6, 182, 212, 0.3);
}
.cs-play-btn.playing {
    background: #06B6D4;
    color: #0a0a0f;
}
.cs-time-display {
    font-size: 0.7rem;
    color: var(--text-muted);
    font-family: 'Courier New', monospace;
    min-width: 100px;
}
.cs-scrubber {
    flex: 1;
    height: 4px;
    background: rgba(255,255,255,0.1);
    border-radius: 2px;
    position: relative;
    cursor: pointer;
}
.cs-scrubber-fill {
    height: 100%;
    background: linear-gradient(90deg, #06B6D4, #22D3EE);
    border-radius: 2px;
    transition: width 0.1s linear;
}
.cs-scrubber-handle {
    position: absolute;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #06B6D4;
    border: 2px solid #fff;
    box-shadow: 0 0 6px rgba(6, 182, 212, 0.5);
    cursor: grab;
}
.cs-speed-selector {
    font-size: 0.65rem;
    color: var(--text-muted);
    padding: 0.2rem 0.5rem;
    background: rgba(255,255,255,0.05);
    border: 1px solid var(--border-subtle);
    border-radius: 4px;
    cursor: pointer;
}

/* Right Panel: Properties */
.cs-right-panel {
    grid-row: 1 / 3;
    border-left: 1px solid var(--border-subtle);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: rgba(0,0,0,0.2);
}
.cs-property-section {
    padding: 0.6rem 0.75rem;
    border-bottom: 1px solid var(--border-subtle);
}
.cs-property-section-title {
    font-size: 0.65rem;
    color: #06B6D4;
    letter-spacing: 0.08em;
    font-family: 'Space Grotesk', sans-serif;
    margin-bottom: 0.5rem;
}
.cs-property-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.4rem;
}
.cs-property-label {
    font-size: 0.7rem;
    color: var(--text-muted);
    min-width: 60px;
}
.cs-prop-field {
    margin-bottom: 0.4rem;
}
.cs-prop-field label {
    display: block;
    font-size: 0.65rem;
    color: var(--text-muted);
    margin-bottom: 0.15rem;
    letter-spacing: 0.03em;
}
.cs-prop-field input[type="text"],
.cs-prop-field textarea,
.cs-prop-field select {
    width: 100%;
    background: rgba(255,255,255,0.05);
    border: 1px solid var(--border-subtle);
    border-radius: 4px;
    padding: 0.3rem 0.5rem;
    color: var(--text-primary);
    font-size: 0.75rem;
    font-family: inherit;
    resize: vertical;
}
.cs-prop-field input[type="text"]:focus,
.cs-prop-field textarea:focus,
.cs-prop-field select:focus {
    border-color: rgba(6, 182, 212, 0.5);
    outline: none;
}
.cs-prop-field input[type="checkbox"] {
    accent-color: #06B6D4;
}
.cs-property-input {
    flex: 1;
    background: rgba(255,255,255,0.05);
    border: 1px solid var(--border-subtle);
    border-radius: 4px;
    padding: 0.3rem 0.5rem;
    color: var(--text-primary);
    font-size: 0.75rem;
}
.cs-property-input:focus {
    border-color: rgba(6, 182, 212, 0.5);
    outline: none;
}
.cs-property-select {
    flex: 1;
    background: rgba(255,255,255,0.05);
    border: 1px solid var(--border-subtle);
    border-radius: 4px;
    padding: 0.3rem 0.5rem;
    color: var(--text-primary);
    font-size: 0.75rem;
}
.cs-color-input {
    width: 28px;
    height: 28px;
    border: 1px solid var(--border-subtle);
    border-radius: 4px;
    padding: 0;
    cursor: pointer;
    background: none;
}
.cs-range-input {
    flex: 1;
    -webkit-appearance: none;
    height: 4px;
    background: rgba(255,255,255,0.1);
    border-radius: 2px;
    outline: none;
}
.cs-range-input::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: #06B6D4;
    cursor: pointer;
}

/* ── Asset Panel (bottom-right) ── */
.cs-asset-panel {
    padding: 0.6rem 0.75rem;
    overflow-y: auto;
    flex: 1;
}
.cs-asset-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.4rem;
}
.cs-asset-btn {
    padding: 0.5rem;
    border-radius: 8px;
    background: rgba(255,255,255,0.03);
    border: 1px solid var(--border-subtle);
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 0.7rem;
    text-align: center;
    transition: all 0.2s;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
}
.cs-asset-btn:hover {
    border-color: rgba(6, 182, 212, 0.3);
    background: rgba(6, 182, 212, 0.05);
    color: #06B6D4;
}
.cs-asset-btn-icon {
    font-size: 1.2rem;
}

/* ── Animation Keyframe Editor ── */
.cs-animation-list {
    padding: 0.4rem 0;
}
.cs-animation-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.4rem 0.5rem;
    border-radius: 6px;
    margin-bottom: 0.25rem;
    background: rgba(255,255,255,0.03);
    border: 1px solid var(--border-subtle);
    font-size: 0.7rem;
}
.cs-animation-item .cs-anim-type {
    color: #06B6D4;
    font-weight: 500;
    min-width: 40px;
}
.cs-animation-item .cs-anim-timing {
    color: var(--text-muted);
}

/* ── Mockup Designer ── */
.cs-mockup-layout {
    display: grid;
    grid-template-columns: 200px 1fr 260px;
    height: 100%;
    overflow: hidden;
}
.cs-mockup-palette {
    border-right: 1px solid var(--border-subtle);
    padding: 0.75rem;
    overflow-y: auto;
    background: rgba(0,0,0,0.2);
}
.cs-mockup-canvas {
    display: flex;
    align-items: center;
    justify-content: center;
    background: #050508;
    overflow: auto;
    padding: 2rem;
}
.cs-mockup-properties {
    border-left: 1px solid var(--border-subtle);
    padding: 0.75rem;
    overflow-y: auto;
    background: rgba(0,0,0,0.2);
}
.cs-component-item {
    padding: 0.5rem;
    border-radius: 8px;
    background: rgba(255,255,255,0.03);
    border: 1px solid var(--border-subtle);
    cursor: pointer;
    margin-bottom: 0.4rem;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.75rem;
    color: var(--text-secondary);
}
.cs-component-item:hover {
    border-color: rgba(6, 182, 212, 0.3);
    background: rgba(6, 182, 212, 0.05);
    color: #06B6D4;
}
.cs-component-icon {
    font-size: 1rem;
    width: 24px;
    text-align: center;
}

/* ── Templates Tab ── */
.cs-templates-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.25rem;
    padding: 1.25rem;
    overflow-y: auto;
}
.cs-template-card {
    background: var(--bg-card, #1a1a2e);
    border: 1px solid var(--border-subtle);
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.2s;
}
.cs-template-card:hover {
    border-color: rgba(6, 182, 212, 0.4);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.3);
}
.cs-template-preview {
    width: 100%;
    aspect-ratio: 16/9;
    background: linear-gradient(135deg, #0a0a0f 0%, #1a1a2e 50%, rgba(6, 182, 212, 0.08) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    border-bottom: 1px solid var(--border-subtle);
}
.cs-template-info {
    padding: 0.75rem;
}
.cs-template-name {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}
.cs-template-desc {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
}
.cs-template-meta {
    display: flex;
    gap: 0.5rem;
    font-size: 0.65rem;
}
.cs-template-tag {
    padding: 0.15rem 0.5rem;
    border-radius: 10px;
    background: rgba(6, 182, 212, 0.1);
    color: rgba(6, 182, 212, 0.8);
}

/* ── Showcase Wizard ── */
.cs-wizard-layout {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    gap: 1.5rem;
    overflow-y: auto;
}
.cs-wizard-title {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.4rem;
    color: var(--text-primary);
    text-align: center;
}
.cs-wizard-subtitle {
    color: var(--text-muted);
    font-size: 0.9rem;
    text-align: center;
    max-width: 500px;
}
.cs-wizard-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    max-width: 800px;
    width: 100%;
}
.cs-wizard-option {
    padding: 1.25rem;
    border-radius: 12px;
    background: var(--bg-card, #1a1a2e);
    border: 2px solid var(--border-subtle);
    cursor: pointer;
    text-align: center;
    transition: all 0.2s;
}
.cs-wizard-option:hover {
    border-color: rgba(6, 182, 212, 0.4);
    background: rgba(6, 182, 212, 0.05);
}
.cs-wizard-option.selected {
    border-color: #06B6D4;
    background: rgba(6, 182, 212, 0.1);
}
.cs-wizard-option-icon {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}
.cs-wizard-option-label {
    font-size: 0.9rem;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}
.cs-wizard-option-desc {
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* ── Create Project Modal ── */
.cs-create-overlay {
    position: fixed;
    inset: 0;
    z-index: 9700;
    background: rgba(0,0,0,0.7);
    display: flex;
    align-items: center;
    justify-content: center;
}
.cs-create-modal {
    background: var(--bg-card, #1a1a2e);
    border: 1px solid rgba(6, 182, 212, 0.3);
    border-radius: 16px;
    padding: 1.5rem;
    width: 480px;
    max-width: 90vw;
}
.cs-create-title {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.1rem;
    color: #06B6D4;
    margin-bottom: 1rem;
}
.cs-form-group {
    margin-bottom: 0.75rem;
}
.cs-form-label {
    display: block;
    font-size: 0.7rem;
    color: var(--text-muted);
    margin-bottom: 0.25rem;
    letter-spacing: 0.04em;
}
.cs-form-input {
    width: 100%;
    background: rgba(255,255,255,0.05);
    border: 1px solid var(--border-subtle);
    border-radius: 8px;
    padding: 0.5rem 0.75rem;
    color: var(--text-primary);
    font-size: 0.85rem;
}
.cs-form-input:focus {
    border-color: rgba(6, 182, 212, 0.5);
    outline: none;
}
.cs-form-select {
    width: 100%;
    background: rgba(255,255,255,0.05);
    border: 1px solid var(--border-subtle);
    border-radius: 8px;
    padding: 0.5rem 0.75rem;
    color: var(--text-primary);
    font-size: 0.85rem;
}
.cs-form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.5rem;
    margin-top: 1rem;
}

/* ── Empty State ── */
.cs-empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem;
    color: var(--text-muted);
    gap: 0.75rem;
    height: 100%;
}
.cs-empty-icon {
    font-size: 3rem;
    opacity: 0.3;
}
.cs-empty-text {
    font-size: 0.9rem;
    text-align: center;
}

/* ── Loading ── */
.cs-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    gap: 0.5rem;
    color: var(--text-muted);
}
.cs-loading-spinner {
    width: 20px;
    height: 20px;
    border: 2px solid rgba(6, 182, 212, 0.2);
    border-top-color: #06B6D4;
    border-radius: 50%;
    animation: csSpinner 0.6s linear infinite;
}
@keyframes csSpinner {
    to { transform: rotate(360deg); }
}

/* ── Progress Bar ── */
.cs-progress-bar {
    width: 100%;
    height: 4px;
    background: rgba(255,255,255,0.1);
    border-radius: 2px;
    overflow: hidden;
}
.cs-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #06B6D4, #22D3EE);
    border-radius: 2px;
    transition: width 0.3s ease;
}

/* ── Export Overlay ── */
.cs-export-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.8);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    z-index: 10;
    border-radius: 4px;
}
.cs-export-title {
    font-size: 1rem;
    color: #06B6D4;
}
.cs-export-status {
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* ── Responsive ── */
@media (max-width: 1200px) {
    .cs-editor-layout {
        grid-template-columns: 180px 1fr 240px;
    }
    .cs-mockup-layout {
        grid-template-columns: 160px 1fr 220px;
    }
}
@media (max-width: 900px) {
    .cs-editor-layout {
        grid-template-columns: 1fr;
        grid-template-rows: auto 1fr auto auto;
    }
    .cs-left-panel {
        grid-row: auto;
        flex-direction: row;
        max-height: 80px;
        overflow-x: auto;
    }
    .cs-right-panel {
        grid-row: auto;
        max-height: 200px;
    }
    .cs-mockup-layout {
        grid-template-columns: 1fr;
    }
}

/* ── Showcase Section in ProposalViewer ── */
.pv-showcase-container {
    width: 100%;
    max-width: 800px;
}
.pv-showcase-canvas-wrap {
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
}
.pv-showcase-canvas {
    width: 100%;
    aspect-ratio: 16/9;
}
.pv-showcase-controls {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 0;
    margin-top: 0.5rem;
}
.pv-showcase-play-btn {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 1px solid rgba(212,168,83,0.3);
    background: rgba(212,168,83,0.1);
    color: var(--gold-primary, #D4A853);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    flex-shrink: 0;
}
.pv-showcase-play-btn:hover {
    background: rgba(212,168,83,0.2);
    border-color: rgba(212,168,83,0.5);
}
.pv-showcase-progress {
    flex: 1;
    min-width: 0;
}
.pv-showcase-progress-bar {
    height: 4px;
    background: rgba(255,255,255,0.1);
    border-radius: 2px;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}
.pv-showcase-progress-bar:hover {
    height: 6px;
}
.pv-showcase-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--gold-primary, #D4A853), rgba(212,168,83,0.6));
    border-radius: 2px;
    transition: width 0.1s linear;
}
.pv-showcase-time {
    font-size: 0.7rem;
    color: var(--text-muted, rgba(232,230,227,0.5));
    font-family: 'Courier New', monospace;
    white-space: nowrap;
    flex-shrink: 0;
}
.pv-showcase-scene-dots {
    display: flex;
    gap: 4px;
    flex-shrink: 0;
}
.pv-showcase-scene-dot {
    width: 6px;
    height: 6px;
    border-radius: 3px;
    border: none;
    background: rgba(255,255,255,0.2);
    cursor: pointer;
    transition: all 0.2s ease;
    padding: 0;
}
.pv-showcase-scene-dot.active {
    width: 16px;
    background: var(--gold-primary, #D4A853);
}
.pv-showcase-scene-dot:hover {
    background: rgba(212,168,83,0.5);
}
.pv-showcase-fallback {
    width: 100%;
    aspect-ratio: 16/9;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #0a0a0f, #1a1a2e);
    color: var(--text-muted);
    font-size: 0.9rem;
    border-radius: 8px;
}
.pv-showcase-fallback img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 8px;
}

/* Showcase editor in Proposal Designer */
.pd-showcase-config {
    background: rgba(6,182,212,0.03);
    border: 1px solid rgba(6,182,212,0.12);
    border-radius: 10px;
    padding: 1rem;
    margin-top: 0.75rem;
}
.pd-showcase-config-title {
    font-size: 0.7rem;
    letter-spacing: 0.1em;
    color: rgba(6,182,212,0.8);
    margin-bottom: 0.75rem;
    font-weight: 500;
}
.pd-showcase-source .pd-btn.active {
    background: rgba(6,182,212,0.15);
    border-color: rgba(6,182,212,0.4);
    color: rgb(6,182,212);
}

/* ==============================
   OUTREACH PIPELINE
   ============================== */

.pipeline-fullscreen {
    position: fixed;
    inset: 0;
    z-index: 9500;
    background: var(--bg-deep, #0a0a0f);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.pipeline-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 1.25rem;
    border-bottom: 1px solid var(--border-subtle, #333);
    background: linear-gradient(135deg, rgba(212,168,83,0.06), rgba(139,92,246,0.03));
    flex-shrink: 0;
}

.pipeline-tabs {
    display: flex;
    gap: 2px;
    background: rgba(0,0,0,0.3);
    border-radius: 8px;
    padding: 3px;
}

.pipeline-tab {
    padding: 8px 16px;
    border: none;
    background: none;
    color: var(--text-muted, #888);
    cursor: pointer;
    font-size: 0.82rem;
    font-weight: 500;
    border-radius: 6px;
    transition: all 0.2s;
    white-space: nowrap;
}
.pipeline-tab:hover {
    color: var(--text-secondary, #ccc);
    background: rgba(255,255,255,0.04);
}
.pipeline-tab.active {
    background: rgba(212,168,83,0.15);
    color: var(--gold-primary, #D4A853);
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

.pipeline-body {
    display: flex;
    flex: 1;
    overflow: hidden;
}

.pipeline-left {
    width: 320px;
    min-width: 280px;
    border-right: 1px solid var(--border-subtle, #333);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.pipeline-center {
    flex: 1;
    overflow-y: auto;
    padding: 1.25rem;
}

.pipeline-right {
    width: 340px;
    min-width: 300px;
    border-left: 1px solid var(--border-subtle, #333);
    overflow-y: auto;
    padding: 1rem;
}

/* Pipeline contact list */
.pipeline-contact-list {
    flex: 1;
    overflow-y: auto;
    padding: 0.5rem;
}

.pipeline-contact-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.15s;
    border: 1px solid transparent;
    margin-bottom: 2px;
}
.pipeline-contact-item:hover {
    background: rgba(255,255,255,0.04);
    border-color: var(--border-subtle, #333);
}
.pipeline-contact-item.active {
    background: rgba(212,168,83,0.1);
    border-color: rgba(212,168,83,0.35);
}
.pipeline-contact-item.sent {
    opacity: 0.5;
}
.pipeline-contact-item.sent::after {
    content: '✓';
    color: #22c55e;
    font-size: 0.7rem;
    margin-left: auto;
}

.pipeline-contact-info {
    flex: 1;
    min-width: 0;
}
.pipeline-contact-name {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-primary, #f5f5f5);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.pipeline-contact-org {
    font-size: 0.72rem;
    color: var(--text-muted, #888);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.pipeline-contact-title {
    font-size: 0.7rem;
    color: var(--text-secondary, #aaa);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.pipeline-contact-score {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    flex-shrink: 0;
}

/* Pipeline buttons */
.pipeline-btn {
    padding: 10px 18px;
    border-radius: 8px;
    border: 1px solid transparent;
    font-weight: 600;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}
.pipeline-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.pipeline-btn.primary {
    background: linear-gradient(135deg, #8B5CF6, #6D28D9);
    color: white;
    border: none;
}
.pipeline-btn.primary:hover:not(:disabled) {
    background: linear-gradient(135deg, #9D6FF8, #7C3AED);
    box-shadow: 0 2px 8px rgba(139,92,246,0.3);
}

.pipeline-btn.gold {
    background: linear-gradient(135deg, rgba(212,168,83,0.2), rgba(212,168,83,0.1));
    color: var(--gold-primary, #D4A853);
    border-color: rgba(212,168,83,0.4);
}
.pipeline-btn.gold:hover:not(:disabled) {
    background: linear-gradient(135deg, rgba(212,168,83,0.3), rgba(212,168,83,0.2));
}

.pipeline-btn.secondary {
    background: rgba(255,255,255,0.05);
    color: var(--text-secondary, #ccc);
    border-color: var(--border-subtle, #333);
}
.pipeline-btn.secondary:hover:not(:disabled) {
    background: rgba(255,255,255,0.08);
    border-color: rgba(255,255,255,0.15);
}

.pipeline-btn.ghost {
    background: none;
    color: var(--text-muted, #888);
    border: none;
    padding: 6px 10px;
}
.pipeline-btn.ghost:hover:not(:disabled) {
    color: var(--text-secondary, #ccc);
    background: rgba(255,255,255,0.04);
}

.pipeline-btn.danger {
    background: rgba(239,68,68,0.12);
    color: #ef4444;
    border-color: rgba(239,68,68,0.3);
}
.pipeline-btn.danger:hover:not(:disabled) {
    background: rgba(239,68,68,0.2);
}

/* Pipeline quality badge */
.pipeline-quality-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.03em;
}
.pipeline-quality-badge.excellent {
    background: rgba(34,197,94,0.15);
    color: #22c55e;
}
.pipeline-quality-badge.good {
    background: rgba(212,168,83,0.15);
    color: #D4A853;
}
.pipeline-quality-badge.basic {
    background: rgba(245,158,11,0.15);
    color: #f59e0b;
}
.pipeline-quality-badge.minimal {
    background: rgba(239,68,68,0.15);
    color: #ef4444;
}

/* Priority badge (used in org list & pipeline) */
.priority-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 28px;
    padding: 1px 5px;
    border-radius: 4px;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.02em;
}

/* Research status badge */
.research-status-badge {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    padding: 1px 6px;
    border-radius: 4px;
    font-size: 0.65rem;
    font-weight: 500;
}
.research-status-badge.complete {
    background: rgba(34,197,94,0.12);
    color: #22c55e;
}
.research-status-badge.partial {
    background: rgba(245,158,11,0.12);
    color: #f59e0b;
}
.research-status-badge.none {
    background: rgba(255,255,255,0.04);
    color: var(--text-muted, #888);
}

/* Boost star */
.boost-star {
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s;
    user-select: none;
}
.boost-star.active {
    color: var(--gold-primary, #D4A853);
    text-shadow: 0 0 6px rgba(212,168,83,0.4);
}
.boost-star.inactive {
    color: rgba(255,255,255,0.15);
}
.boost-star:hover {
    transform: scale(1.2);
}

/* Pipeline filter chips */
.pipeline-filter-chips {
    display: flex;
    gap: 4px;
    padding: 8px 12px;
    border-bottom: 1px solid var(--border-subtle, #333);
    flex-wrap: wrap;
}
.pipeline-filter-chip {
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 0.72rem;
    border: 1px solid var(--border-subtle, #333);
    background: none;
    color: var(--text-muted, #888);
    cursor: pointer;
    transition: all 0.15s;
}
.pipeline-filter-chip:hover {
    border-color: rgba(255,255,255,0.15);
    color: var(--text-secondary, #ccc);
}
.pipeline-filter-chip.active {
    background: rgba(212,168,83,0.15);
    border-color: rgba(212,168,83,0.4);
    color: var(--gold-primary, #D4A853);
}

/* Pipeline search */
.pipeline-search {
    width: 100%;
    padding: 8px 12px;
    background: var(--bg-input, #0d0d12);
    border: 1px solid var(--border-subtle, #333);
    border-radius: 6px;
    color: var(--text-primary, #f5f5f5);
    font-size: 0.82rem;
}
.pipeline-search:focus {
    outline: none;
    border-color: rgba(212,168,83,0.4);
}
.pipeline-search::placeholder {
    color: var(--text-muted, #888);
}

/* Pipeline spinner */
@keyframes pipelineSpin {
    to { transform: rotate(360deg); }
}
.pipeline-spinner {
    display: inline-block;
    width: 14px;
    height: 14px;
    border: 2px solid rgba(255,255,255,0.2);
    border-top-color: var(--gold-primary, #D4A853);
    border-radius: 50%;
    animation: pipelineSpin 0.8s linear infinite;
    vertical-align: middle;
}

/* Pipeline draft card (review tab) */
.pipeline-draft-card {
    background: var(--bg-card, #12121a);
    border: 1px solid var(--border-subtle, #333);
    border-radius: 10px;
    padding: 1rem;
    margin-bottom: 0.75rem;
    transition: border-color 0.2s;
}
.pipeline-draft-card:hover {
    border-color: rgba(212,168,83,0.3);
}
.pipeline-draft-card.sent {
    border-color: rgba(34,197,94,0.3);
    opacity: 0.7;
}

/* Pipeline context section */
.pipeline-context-section {
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}
.pipeline-context-section:last-child {
    border-bottom: none;
    margin-bottom: 0;
}
.pipeline-context-label {
    font-size: 0.68rem;
    font-weight: 600;
    color: var(--gold-primary, #D4A853);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.5rem;
}
.pipeline-context-value {
    font-size: 0.82rem;
    color: var(--text-secondary, #ccc);
    line-height: 1.4;
}

/* Pipeline draft editor */
.pipeline-draft-subject {
    width: 100%;
    padding: 10px 14px;
    background: var(--bg-card, #12121a);
    border: 1px solid var(--border-subtle, #333);
    border-radius: 8px;
    color: var(--text-primary, #f5f5f5);
    font-size: 0.9rem;
    font-weight: 500;
}
.pipeline-draft-subject:focus {
    outline: none;
    border-color: rgba(212,168,83,0.4);
}

.pipeline-draft-body {
    width: 100%;
    padding: 12px 14px;
    background: var(--bg-card, #12121a);
    border: 1px solid var(--border-subtle, #333);
    border-radius: 8px;
    color: var(--text-primary, #f5f5f5);
    font-size: 0.85rem;
    line-height: 1.6;
    resize: vertical;
    font-family: inherit;
    min-height: 200px;
}
.pipeline-draft-body:focus {
    outline: none;
    border-color: rgba(212,168,83,0.4);
}

/* Pipeline batch research config */
.pipeline-research-config {
    background: var(--bg-card, #12121a);
    border: 1px solid var(--border-subtle, #333);
    border-radius: 10px;
    padding: 1.25rem;
}
.pipeline-research-config label {
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--text-secondary, #ccc);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: block;
    margin-bottom: 0.4rem;
}
.pipeline-research-config select {
    width: 100%;
    padding: 9px 12px;
    background: var(--bg-input, #0d0d12);
    color: var(--text-primary, #f5f5f5);
    border: 1px solid var(--border-subtle, #333);
    border-radius: 6px;
    font-size: 0.82rem;
    margin-bottom: 1rem;
}

/* Pipeline progress stats grid */
.pipeline-progress-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-bottom: 1rem;
}
.pipeline-progress-stat {
    text-align: center;
    padding: 12px;
    background: rgba(0,0,0,0.3);
    border-radius: 8px;
    border: 1px solid var(--border-subtle, #333);
}
.pipeline-progress-stat .stat-value {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--text-primary, #f5f5f5);
}
.pipeline-progress-stat .stat-label {
    font-size: 0.68rem;
    color: var(--text-muted, #888);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 2px;
}

/* Pipeline empty state */
.pipeline-empty {
    text-align: center;
    padding: 3rem 2rem;
    color: var(--text-muted, #888);
}
.pipeline-empty-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}
.pipeline-empty-title {
    font-size: 1rem;
    font-weight: 500;
    color: var(--text-secondary, #ccc);
    margin-bottom: 0.5rem;
}
.pipeline-empty-desc {
    font-size: 0.82rem;
    line-height: 1.5;
}

/* Responsive: collapse right panel on smaller screens */
@media (max-width: 1200px) {
    .pipeline-right {
        width: 280px;
        min-width: 240px;
    }
    .pipeline-left {
        width: 280px;
        min-width: 240px;
    }
}
@media (max-width: 900px) {
    .pipeline-right {
        display: none;
    }
    .pipeline-left {
        width: 240px;
        min-width: 200px;
    }
}

/* ============================================
   GROWTH STRATEGY AGENT
   ============================================ */

.gs-fullscreen {
    position: fixed;
    inset: 0;
    z-index: 9500;
    display: flex;
    flex-direction: column;
    background: var(--bg-primary);
    animation: gsSlideIn 0.3s ease;
}
@keyframes gsSlideIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}
.gs-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 24px;
    border-bottom: 1px solid var(--border-subtle);
    background: var(--bg-card);
    flex-shrink: 0;
}
.gs-header-left {
    display: flex;
    align-items: center;
    gap: 12px;
}
.gs-header-left svg {
    width: 24px;
    height: 24px;
    color: #22c55e;
}
.gs-header-title {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-primary);
}
.gs-header-right {
    display: flex;
    align-items: center;
    gap: 12px;
}
.gs-close-btn {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    border: 1px solid var(--border-subtle);
    background: rgba(255,255,255,0.05);
    color: var(--text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    transition: all 0.2s;
}
.gs-close-btn:hover {
    background: rgba(255,255,255,0.1);
    color: var(--text-primary);
}
.gs-operation-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    background: rgba(34,197,94,0.15);
    color: #22c55e;
    border: 1px solid rgba(34,197,94,0.3);
}
.gs-operation-badge .gs-pulse {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #22c55e;
    animation: gsPulse 1.5s ease-in-out infinite;
}
@keyframes gsPulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(0.8); }
}
.gs-nav {
    display: flex;
    gap: 0;
    padding: 0 24px;
    background: var(--bg-card);
    border-bottom: 1px solid var(--border-subtle);
    flex-shrink: 0;
}
.gs-nav-tab {
    padding: 12px 20px;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-muted);
    cursor: pointer;
    border-bottom: 2px solid transparent;
    transition: all 0.2s;
    background: none;
    border-top: none;
    border-left: none;
    border-right: none;
}
.gs-nav-tab:hover {
    color: var(--text-secondary);
    background: rgba(255,255,255,0.03);
}
.gs-nav-tab.active {
    color: var(--gold-primary);
    border-bottom-color: var(--gold-primary);
}
.gs-body {
    flex: 1;
    overflow: auto;
    padding: 24px;
}
.gs-tab-content {
    display: none;
}
.gs-tab-content.active {
    display: block;
}
/* Strategy Tab */
.gs-strategy-form {
    max-width: 700px;
    margin: 0 auto;
}
.gs-context-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 12px;
    margin-bottom: 24px;
}
.gs-context-card {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: 10px;
    padding: 16px;
    text-align: center;
}
.gs-stat-value {
    font-size: 28px;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.2;
}
.gs-stat-label {
    font-size: 11px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 4px;
}
/* Form Controls */
.gs-form-group {
    margin-bottom: 20px;
}
.gs-form-group label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 8px;
}
.gs-input,
.gs-select,
.gs-textarea {
    width: 100%;
    padding: 10px 14px;
    background: rgba(255,255,255,0.05);
    border: 1px solid var(--border-subtle);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 14px;
    font-family: inherit;
    transition: border-color 0.2s;
    box-sizing: border-box;
}
.gs-input:focus,
.gs-select:focus,
.gs-textarea:focus {
    outline: none;
    border-color: var(--gold-primary);
}
.gs-textarea {
    min-height: 80px;
    resize: vertical;
}
.gs-select option {
    background: #1a1a2e;
    color: var(--text-primary);
}
/* Buttons */
.gs-btn {
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}
.gs-btn-gold {
    background: linear-gradient(135deg, var(--gold-primary), #c49b4a);
    color: #1a1a2e;
}
.gs-btn-gold:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(212,168,83,0.3);
}
.gs-btn-gold:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}
.gs-btn-primary {
    background: rgba(99,102,241,0.2);
    color: #818cf8;
    border: 1px solid rgba(99,102,241,0.3);
}
.gs-btn-primary:hover {
    background: rgba(99,102,241,0.3);
}
.gs-btn-secondary {
    background: rgba(255,255,255,0.05);
    color: var(--text-secondary);
    border: 1px solid var(--border-subtle);
}
.gs-btn-secondary:hover {
    background: rgba(255,255,255,0.1);
}
.gs-btn-green {
    background: rgba(34,197,94,0.2);
    color: #22c55e;
    border: 1px solid rgba(34,197,94,0.3);
}
.gs-btn-green:hover {
    background: rgba(34,197,94,0.3);
}
.gs-btn-sm {
    padding: 6px 12px;
    font-size: 12px;
}
.gs-btn-danger {
    background: rgba(239,68,68,0.15);
    color: #ef4444;
    border: 1px solid rgba(239,68,68,0.3);
}
.gs-btn-danger:hover {
    background: rgba(239,68,68,0.25);
}
/* Focus Selector */
.gs-focus-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 10px;
    margin-bottom: 20px;
}
.gs-focus-option {
    padding: 14px;
    background: rgba(255,255,255,0.03);
    border: 2px solid var(--border-subtle);
    border-radius: 10px;
    cursor: pointer;
    text-align: center;
    transition: all 0.2s;
    color: var(--text-secondary);
    font-size: 13px;
    font-weight: 600;
}
.gs-focus-option:hover {
    border-color: rgba(212,168,83,0.4);
    background: rgba(212,168,83,0.05);
}
.gs-focus-option.active {
    border-color: var(--gold-primary);
    background: rgba(212,168,83,0.1);
    color: var(--gold-primary);
}
/* Strategy Document */
.gs-strategy-doc {
    max-width: 800px;
    margin: 0 auto;
}
.gs-strategy-header {
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border-subtle);
}
.gs-strategy-header h2 {
    font-size: 22px;
    color: var(--text-primary);
    margin: 0 0 8px 0;
}
.gs-strategy-header p {
    color: var(--text-secondary);
    font-size: 14px;
    line-height: 1.6;
    margin: 0;
}
.gs-phase {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: 12px;
    margin-bottom: 16px;
    overflow: hidden;
}
.gs-phase-header {
    padding: 16px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    transition: background 0.2s;
}
.gs-phase-header:hover {
    background: rgba(255,255,255,0.03);
}
.gs-phase-title {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 8px;
}
.gs-phase-badge {
    font-size: 11px;
    padding: 2px 8px;
    border-radius: 10px;
    background: rgba(212,168,83,0.15);
    color: var(--gold-primary);
    font-weight: 600;
}
.gs-phase-body {
    padding: 0 20px 16px;
    color: var(--text-secondary);
    font-size: 14px;
    line-height: 1.6;
}
.gs-phase-body.collapsed {
    display: none;
}
.gs-action-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px;
    background: rgba(255,255,255,0.03);
    border-radius: 8px;
    margin-top: 8px;
}
.gs-action-item span {
    color: var(--text-secondary);
    font-size: 13px;
}
/* Target Lists Tab */
.gs-lists-layout {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 24px;
    height: calc(100vh - 160px);
}
.gs-lists-sidebar {
    display: flex;
    flex-direction: column;
    border: 1px solid var(--border-subtle);
    border-radius: 12px;
    background: var(--bg-card);
    overflow: hidden;
}
.gs-lists-sidebar-header {
    padding: 16px;
    border-bottom: 1px solid var(--border-subtle);
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.gs-search {
    width: 100%;
    padding: 8px 12px;
    background: rgba(255,255,255,0.05);
    border: 1px solid var(--border-subtle);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 13px;
    box-sizing: border-box;
}
.gs-search:focus {
    outline: none;
    border-color: var(--gold-primary);
}
.gs-lists-scroll {
    flex: 1;
    overflow-y: auto;
    padding: 8px;
}
.gs-list-item {
    padding: 12px 14px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    margin-bottom: 4px;
}
.gs-list-item:hover {
    background: rgba(255,255,255,0.05);
}
.gs-list-item.active {
    background: rgba(212,168,83,0.1);
    border: 1px solid rgba(212,168,83,0.3);
}
.gs-list-item-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 4px;
}
.gs-list-item-meta {
    font-size: 11px;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 8px;
}
.gs-list-detail {
    border: 1px solid var(--border-subtle);
    border-radius: 12px;
    background: var(--bg-card);
    overflow-y: auto;
    padding: 24px;
}
.gs-list-detail-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}
.gs-list-detail-header h3 {
    margin: 0;
    font-size: 18px;
    color: var(--text-primary);
}
/* Type Badge */
.gs-type-badge {
    display: inline-flex;
    padding: 3px 10px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 600;
}
.gs-type-badge.manual {
    background: rgba(99,102,241,0.15);
    color: #818cf8;
}
.gs-type-badge.filtered {
    background: rgba(34,197,94,0.15);
    color: #22c55e;
}
.gs-type-badge.ai {
    background: rgba(212,168,83,0.15);
    color: var(--gold-primary);
}
/* Progress Dashboard */
.gs-progress-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin-bottom: 24px;
}
.gs-progress-card {
    background: rgba(255,255,255,0.03);
    border: 1px solid var(--border-subtle);
    border-radius: 10px;
    padding: 16px;
    text-align: center;
}
.gs-progress-ring {
    width: 56px;
    height: 56px;
    margin: 0 auto 8px;
    position: relative;
}
.gs-progress-ring svg {
    width: 56px;
    height: 56px;
    transform: rotate(-90deg);
}
.gs-progress-ring circle {
    fill: none;
    stroke-width: 4;
}
.gs-progress-ring .bg {
    stroke: rgba(255,255,255,0.08);
}
.gs-progress-ring .fg {
    stroke-linecap: round;
    transition: stroke-dashoffset 0.5s ease;
}
.gs-progress-pct {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 700;
    color: var(--text-primary);
}
.gs-progress-label {
    font-size: 11px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
/* List Actions */
.gs-list-actions {
    display: flex;
    gap: 8px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}
/* Org Table in List Detail */
.gs-org-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    font-size: 13px;
}
.gs-org-table th {
    text-align: left;
    padding: 10px 12px;
    color: var(--text-muted);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 1px solid var(--border-subtle);
    font-weight: 600;
}
.gs-org-table td {
    padding: 10px 12px;
    color: var(--text-secondary);
    border-bottom: 1px solid rgba(255,255,255,0.03);
}
.gs-org-table tr:hover td {
    background: rgba(255,255,255,0.03);
}
/* List Creation Form */
.gs-create-form {
    max-width: 600px;
}
.gs-type-selector {
    display: flex;
    gap: 8px;
    margin-bottom: 20px;
}
.gs-type-btn {
    flex: 1;
    padding: 12px;
    background: rgba(255,255,255,0.03);
    border: 2px solid var(--border-subtle);
    border-radius: 10px;
    color: var(--text-secondary);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    text-align: center;
    transition: all 0.2s;
}
.gs-type-btn:hover {
    border-color: rgba(212,168,83,0.4);
}
.gs-type-btn.active {
    border-color: var(--gold-primary);
    background: rgba(212,168,83,0.1);
    color: var(--gold-primary);
}
/* Manual Org Selector */
.gs-org-selector {
    border: 1px solid var(--border-subtle);
    border-radius: 10px;
    max-height: 350px;
    overflow-y: auto;
}
.gs-org-selector-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    border-bottom: 1px solid rgba(255,255,255,0.03);
    cursor: pointer;
    transition: background 0.2s;
}
.gs-org-selector-item:hover {
    background: rgba(255,255,255,0.05);
}
.gs-org-selector-item.selected {
    background: rgba(212,168,83,0.08);
}
.gs-org-selector-item input[type="checkbox"] {
    accent-color: var(--gold-primary);
}
.gs-org-selector-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
}
.gs-org-selector-meta {
    font-size: 11px;
    color: var(--text-muted);
}
/* Filter Builder */
.gs-filter-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}
.gs-filter-section {
    margin-bottom: 16px;
}
.gs-filter-section label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-muted);
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.gs-filter-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}
.gs-filter-chip {
    padding: 5px 12px;
    border-radius: 16px;
    font-size: 12px;
    font-weight: 500;
    background: rgba(255,255,255,0.05);
    border: 1px solid var(--border-subtle);
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s;
}
.gs-filter-chip:hover {
    border-color: rgba(212,168,83,0.4);
}
.gs-filter-chip.active {
    background: rgba(212,168,83,0.15);
    border-color: var(--gold-primary);
    color: var(--gold-primary);
}
.gs-range-inputs {
    display: flex;
    align-items: center;
    gap: 8px;
}
.gs-range-inputs input {
    width: 80px;
    padding: 6px 10px;
    background: rgba(255,255,255,0.05);
    border: 1px solid var(--border-subtle);
    border-radius: 6px;
    color: var(--text-primary);
    font-size: 13px;
    text-align: center;
}
.gs-range-inputs span {
    color: var(--text-muted);
    font-size: 12px;
}
.gs-filter-preview {
    padding: 12px 16px;
    background: rgba(34,197,94,0.08);
    border: 1px solid rgba(34,197,94,0.2);
    border-radius: 8px;
    color: #22c55e;
    font-size: 14px;
    font-weight: 600;
    margin-top: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}
/* Campaigns Tab */
.gs-campaigns-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 16px;
}
.gs-campaign-card {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: 12px;
    padding: 20px;
    transition: all 0.2s;
}
.gs-campaign-card:hover {
    border-color: rgba(212,168,83,0.3);
}
.gs-campaign-card h4 {
    margin: 0 0 8px;
    font-size: 16px;
    color: var(--text-primary);
}
.gs-campaign-meta {
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: 12px;
}
.gs-campaign-funnel {
    display: flex;
    gap: 4px;
    margin-bottom: 12px;
}
.gs-campaign-funnel-step {
    flex: 1;
    height: 6px;
    border-radius: 3px;
    background: rgba(255,255,255,0.08);
    overflow: hidden;
}
.gs-campaign-funnel-step .fill {
    height: 100%;
    border-radius: 3px;
    background: linear-gradient(90deg, #22c55e, var(--gold-primary));
}
/* Activity Tab */
.gs-activity-list {
    max-width: 700px;
    margin: 0 auto;
}
.gs-activity-entry {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid rgba(255,255,255,0.03);
}
.gs-activity-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    margin-top: 5px;
    flex-shrink: 0;
}
.gs-activity-dot.success { background: #22c55e; }
.gs-activity-dot.error { background: #ef4444; }
.gs-activity-dot.info { background: #3b82f6; }
.gs-activity-dot.warning { background: #f59e0b; }
.gs-activity-dot.pending { background: var(--text-muted); }
.gs-activity-msg {
    flex: 1;
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.5;
}
.gs-activity-time {
    font-size: 11px;
    color: var(--text-muted);
    flex-shrink: 0;
    white-space: nowrap;
}
/* Empty States */
.gs-empty {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-muted);
}
.gs-empty svg {
    width: 48px;
    height: 48px;
    margin-bottom: 16px;
    opacity: 0.4;
}
.gs-empty h3 {
    font-size: 18px;
    color: var(--text-secondary);
    margin: 0 0 8px;
}
.gs-empty p {
    font-size: 14px;
    margin: 0 0 20px;
}
/* Spinner */
.gs-spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255,255,255,0.2);
    border-top-color: var(--gold-primary);
    border-radius: 50%;
    animation: gsSpin 0.8s linear infinite;
}
@keyframes gsSpin {
    to { transform: rotate(360deg); }
}
/* Agent Lane Selector */
.gs-lane-selector {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--border-subtle);
}
.gs-lane-selector label {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-muted);
    white-space: nowrap;
}

/* ============================================
   PROPOSAL DESIGN AGENT OVERLAY
   ============================================ */

.pd-design-agent-overlay {
    position: fixed;
    inset: 0;
    z-index: 9600;
    background: rgba(0,0,0,0.85);
    display: flex;
    align-items: center;
    justify-content: center;
    animation: pdDAFadeIn 0.3s ease;
}
@keyframes pdDAFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}
.pd-design-agent-panel {
    width: 560px;
    max-height: 80vh;
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: 16px;
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 60px rgba(0,0,0,0.5);
}
.pd-da-header {
    padding: 20px 24px;
    border-bottom: 1px solid var(--border-subtle);
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.pd-da-header h3 {
    margin: 0;
    font-size: 16px;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 8px;
}
.pd-da-step-indicator {
    font-size: 12px;
    color: var(--text-muted);
    font-weight: 600;
}
.pd-da-body {
    flex: 1;
    overflow-y: auto;
    padding: 16px 24px;
}
.pd-da-log-entry {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 6px 0;
    font-size: 13px;
}
.pd-da-log-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-top: 5px;
    flex-shrink: 0;
}
.pd-da-log-dot.success { background: #22c55e; }
.pd-da-log-dot.error { background: #ef4444; }
.pd-da-log-dot.info { background: #3b82f6; }
.pd-da-log-dot.warning { background: #f59e0b; }
.pd-da-log-dot.pending { background: var(--text-muted); }
.pd-da-log-msg {
    color: var(--text-secondary);
    line-height: 1.5;
}
.pd-da-footer {
    padding: 16px 24px;
    border-top: 1px solid var(--border-subtle);
    display: flex;
    justify-content: flex-end;
    gap: 8px;
}
/* Design Agent Results */
.pd-da-results {
    padding: 24px;
}
.pd-da-comparison {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 24px;
}
.pd-da-score-card {
    background: rgba(255,255,255,0.03);
    border: 1px solid var(--border-subtle);
    border-radius: 12px;
    padding: 20px;
    text-align: center;
}
.pd-da-score-card h4 {
    margin: 0 0 12px;
    font-size: 14px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.pd-da-score-value {
    font-size: 36px;
    font-weight: 700;
    line-height: 1.2;
}
.pd-da-score-value.before { color: var(--text-secondary); }
.pd-da-score-value.after { color: #22c55e; }
.pd-da-persona-breakdown {
    margin-top: 16px;
}
.pd-da-persona-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 12px;
    border-bottom: 1px solid rgba(255,255,255,0.03);
    font-size: 13px;
}
.pd-da-persona-row .name {
    color: var(--text-secondary);
}
.pd-da-persona-row .score {
    font-weight: 600;
}
/* Responsive */
@media (max-width: 768px) {
    .gs-lists-layout {
        grid-template-columns: 1fr;
    }
    .gs-progress-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .gs-filter-grid {
        grid-template-columns: 1fr;
    }
    .pd-design-agent-panel {
        width: 95%;
        max-height: 90vh;
    }
}

/* ============================================
   PUBLIC RELATIONS AGENT
   ============================================ */

.pr-fullscreen {
    position: fixed;
    inset: 0;
    z-index: 9500;
    display: flex;
    flex-direction: column;
    background: var(--bg-primary);
    animation: prSlideIn 0.3s ease;
}
@keyframes prSlideIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}
.pr-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 24px;
    border-bottom: 1px solid var(--border-subtle);
    background: var(--bg-card);
    flex-shrink: 0;
}
.pr-close-btn {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    border: 1px solid var(--border-subtle);
    background: rgba(255,255,255,0.05);
    color: var(--text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    transition: all 0.2s;
}
.pr-close-btn:hover {
    background: rgba(255,255,255,0.1);
    color: var(--text-primary);
}
.pr-operation-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    background: rgba(99,102,241,0.15);
    color: #818cf8;
    border: 1px solid rgba(99,102,241,0.3);
}
.pr-nav {
    display: flex;
    gap: 0;
    padding: 0 24px;
    background: var(--bg-card);
    border-bottom: 1px solid var(--border-subtle);
    flex-shrink: 0;
}
.pr-nav-tab {
    padding: 12px 20px;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-muted);
    cursor: pointer;
    border-bottom: 2px solid transparent;
    transition: all 0.2s;
    background: none;
    border-top: none;
    border-left: none;
    border-right: none;
}
.pr-nav-tab:hover {
    color: var(--text-secondary);
    background: rgba(255,255,255,0.03);
}
.pr-nav-tab.active {
    color: #818cf8;
    border-bottom-color: #818cf8;
}
.pr-body {
    flex: 1;
    overflow: auto;
    padding: 24px;
}
/* PR Buttons */
.pr-btn {
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}
.pr-btn-primary {
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    color: white;
}
.pr-btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(99,102,241,0.3);
}
.pr-btn-primary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}
.pr-btn-sm {
    padding: 6px 12px;
    font-size: 12px;
}
/* Pitch Status Badges */
.pr-status-unpitched {
    background: rgba(107,114,128,0.12);
    color: #9ca3af;
}
.pr-status-pitched {
    background: rgba(59,130,246,0.12);
    color: #60a5fa;
}
.pr-status-interested {
    background: rgba(34,197,94,0.12);
    color: #4ade80;
}
.pr-status-declined {
    background: rgba(239,68,68,0.12);
    color: #f87171;
}
.pr-status-covered {
    background: rgba(212,168,83,0.12);
    color: #D4A853;
}
/* Shared Intel Note Cards */
.agent-note-card {
    border-radius: 10px;
    padding: 16px;
    margin-bottom: 10px;
}
.agent-note-type-insight {
    background: rgba(59,130,246,0.1);
    border: 1px solid rgba(59,130,246,0.25);
}
.agent-note-type-opportunity {
    background: rgba(34,197,94,0.1);
    border: 1px solid rgba(34,197,94,0.25);
}
.agent-note-type-concern {
    background: rgba(239,68,68,0.1);
    border: 1px solid rgba(239,68,68,0.25);
}
.agent-note-type-recommendation {
    background: rgba(212,168,83,0.1);
    border: 1px solid rgba(212,168,83,0.25);
}

/* ═══════════════════════════════════════════
   Review & Send + Send Confirmation Styles
   ═══════════════════════════════════════════ */
.gs-review-card {
    transition: border-color 0.2s ease;
}
.gs-review-card:hover {
    border-color: rgba(212,168,83,0.4) !important;
}
.gs-send-confirm-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    animation: fadeIn 0.15s ease;
}
.gs-send-confirm-modal {
    background: var(--bg-card, #1a1a2e);
    border: 1px solid var(--border-subtle, #333);
    border-radius: 16px;
    padding: 28px;
    max-width: 520px;
    width: 90%;
    animation: slideUp 0.2s ease;
}
@keyframes slideUp {
    from { transform: translateY(20px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}
.gs-recommendation-card {
    transition: border-color 0.2s ease, transform 0.15s ease;
}
.gs-recommendation-card:hover {
    border-color: rgba(212,168,83,0.4) !important;
    transform: translateY(-1px);
}
.pipeline-quality-badge {
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
}
.quality-rich {
    background: rgba(34,197,94,0.15);
    color: #22c55e;
}
.quality-good {
    background: rgba(59,130,246,0.15);
    color: #3b82f6;
}
.quality-basic {
    background: rgba(245,158,11,0.15);
    color: #f59e0b;
}
.quality-none {
    background: rgba(107,114,128,0.15);
    color: #6b7280;
}

/* ══════════════════════════════════════
   OPERATIONS CENTER / MORNING BRIEFING
   ══════════════════════════════════════ */

.mb-section-card {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: 12px;
    padding: 1.25rem;
    margin-bottom: 1rem;
}
.mb-section-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 0.75rem;
}
.mb-section-icon {
    font-size: 1.1rem;
}
.mb-section-title {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--gold-primary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.mb-stat-pill {
    display: inline-flex;
    align-items: center;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 500;
}
.mb-stat-research {
    background: rgba(34,197,94,0.12);
    color: #4ade80;
    border: 1px solid rgba(34,197,94,0.25);
}
.mb-stat-draft {
    background: rgba(212,168,83,0.12);
    color: #D4A853;
    border: 1px solid rgba(212,168,83,0.25);
}
.mb-stat-send {
    background: rgba(139,92,246,0.12);
    color: #a78bfa;
    border: 1px solid rgba(139,92,246,0.25);
}
.mb-stat-strategy {
    background: rgba(59,130,246,0.12);
    color: #60a5fa;
    border: 1px solid rgba(59,130,246,0.25);
}
.mb-plan-card {
    border-color: rgba(251,191,36,0.3);
}
.mb-plan-status {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 12px;
    border-radius: 10px;
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}
.mb-status-pending {
    background: rgba(251,191,36,0.12);
    color: #fbbf24;
    border: 1px solid rgba(251,191,36,0.3);
}
.mb-status-approved {
    background: rgba(34,197,94,0.12);
    color: #4ade80;
    border: 1px solid rgba(34,197,94,0.3);
}
.mb-status-executing {
    background: rgba(59,130,246,0.12);
    color: #60a5fa;
    border: 1px solid rgba(59,130,246,0.3);
}
.mb-status-completed {
    background: rgba(34,197,94,0.15);
    color: #22c55e;
    border: 1px solid rgba(34,197,94,0.35);
}
.mb-status-rejected {
    background: rgba(248,113,113,0.12);
    color: #f87171;
    border: 1px solid rgba(248,113,113,0.3);
}
.mb-action-card {
    display: flex;
    align-items: center;
    padding: 10px 12px;
    background: rgba(0,0,0,0.15);
    border: 1px solid var(--border-subtle);
    border-radius: 8px;
    margin-bottom: 6px;
    transition: border-color 0.2s;
}
.mb-action-card:hover {
    border-color: rgba(251,191,36,0.3);
}
.mb-action-done {
    opacity: 0.6;
    border-color: rgba(34,197,94,0.2);
}
.mb-action-skipped {
    opacity: 0.4;
}
.mb-action-running {
    border-color: rgba(59,130,246,0.4);
    background: rgba(59,130,246,0.05);
}
.mb-list-card {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: 10px;
    padding: 12px 16px;
    margin-bottom: 8px;
    transition: border-color 0.2s;
}
.mb-list-card:hover {
    border-color: rgba(251,191,36,0.3);
}
.mb-quick-action {
    background: rgba(255,255,255,0.03);
    border: 1px solid var(--border-subtle);
    border-radius: 10px;
    padding: 12px 16px;
    color: var(--text-secondary);
    font-size: 0.82rem;
    cursor: pointer;
    transition: all 0.2s;
    text-align: left;
}
.mb-quick-action:hover {
    background: rgba(251,191,36,0.08);
    border-color: rgba(251,191,36,0.3);
    color: var(--text-primary);
}

/* Goal-Driven Workflow */
.mb-goal-card {
    border-color: rgba(251,191,36,0.25);
    background: linear-gradient(135deg, rgba(251,191,36,0.04), transparent);
}
.mb-goal-textarea {
    width: 100%;
    box-sizing: border-box;
    background: rgba(0,0,0,0.3);
    border: 1px solid var(--border-subtle);
    border-radius: 10px;
    padding: 12px 16px;
    color: var(--text-primary);
    font-size: 0.9rem;
    font-family: inherit;
    resize: none;
    transition: border-color 0.2s;
}
.mb-goal-textarea:focus {
    outline: none;
    border-color: rgba(251,191,36,0.5);
}
.mb-goal-textarea::placeholder {
    color: var(--text-muted);
    font-style: italic;
}
.mb-goal-preview {
    background: rgba(0,0,0,0.2);
    border: 1px solid var(--border-subtle);
    border-radius: 8px;
    padding: 12px;
}
.mb-goal-tag {
    display: inline-flex;
    align-items: center;
    padding: 3px 10px;
    border-radius: 8px;
    font-size: 0.7rem;
    font-weight: 500;
    margin-right: 4px;
    margin-bottom: 4px;
}
.mb-goal-history-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 12px;
    background: rgba(0,0,0,0.1);
    border: 1px solid var(--border-subtle);
    border-radius: 8px;
    margin-bottom: 6px;
    font-size: 0.8rem;
    transition: border-color 0.2s;
}
.mb-goal-history-item:hover {
    border-color: rgba(251,191,36,0.3);
}

/* ─── Workflow Next-Action Banner ──────────────────────────── */
@keyframes lumSlideUp {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}
.lum-next-action-banner {
    background: var(--bg-card, #12121a);
    border: 1px solid rgba(212,168,83,0.3);
    border-radius: 12px;
    padding: 0.75rem 1.25rem;
    margin-top: 1rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    animation: lumSlideUp 0.3s ease;
}
.lum-next-action-btn {
    background: linear-gradient(135deg, #D4A853, #b8860b);
    color: #0f1117;
    border: none;
    border-radius: 8px;
    padding: 0.5rem 1rem;
    font-weight: 600;
    font-size: 0.82rem;
    cursor: pointer;
    white-space: nowrap;
    transition: opacity 0.2s;
}
.lum-next-action-btn:hover { opacity: 0.9; }
.lum-next-action-btn:focus-visible { outline: 2px solid var(--gold-primary, #D4A853); outline-offset: 2px; }
.lum-next-action-btn-secondary {
    background: rgba(255,255,255,0.06);
    color: var(--text-secondary, #ccc);
    border: 1px solid var(--border-subtle, #333);
    border-radius: 8px;
    padding: 0.5rem 1rem;
    font-weight: 600;
    font-size: 0.82rem;
    cursor: pointer;
    white-space: nowrap;
    transition: border-color 0.2s;
}
.lum-next-action-btn-secondary:hover { border-color: rgba(212,168,83,0.4); }
.lum-next-action-btn-secondary:focus-visible { outline: 2px solid var(--gold-primary, #D4A853); outline-offset: 2px; }
.lum-next-action-dismiss {
    background: none;
    border: none;
    color: var(--text-muted, #888);
    font-size: 1.2rem;
    cursor: pointer;
    padding: 0.25rem 0.5rem;
    line-height: 1;
    margin-left: auto;
}
.lum-next-action-dismiss:hover { color: var(--text-primary, #f5f5f5); }
.lum-next-action-dismiss:focus-visible { outline: 2px solid var(--gold-primary, #D4A853); outline-offset: 2px; }

/* ─── Workflow Progress Checklist ──────────────────────────── */
.lum-workflow-progress {
    background: rgba(255,255,255,0.02);
    border: 1px solid var(--border-subtle, #333);
    border-radius: 10px;
    padding: 0.75rem 1rem;
    margin-bottom: 1rem;
}
.lum-workflow-progress-title {
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--gold-primary, #D4A853);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.5rem;
}
.lum-workflow-step {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.25rem 0;
    font-size: 0.78rem;
    color: var(--text-muted, #888);
}
.lum-workflow-step.completed {
    color: var(--text-secondary, #ccc);
}
.lum-workflow-step.completed .lum-wf-icon {
    color: #4ade80;
}
.lum-workflow-step.suggested {
    color: var(--gold-primary, #D4A853);
}
.lum-workflow-step.suggested .lum-wf-icon {
    color: var(--gold-primary, #D4A853);
}
.lum-wf-icon {
    width: 14px;
    text-align: center;
    font-size: 0.75rem;
}

/* ─── Cost Badge ───────────────────────────────────────────── */
.lum-cost-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    background: rgba(255,255,255,0.04);
    border: 1px solid var(--border-subtle, #333);
    border-radius: 6px;
    padding: 0.3rem 0.6rem;
    font-size: 0.72rem;
    color: var(--text-muted, #888);
    margin-top: 0.5rem;
}
.lum-cost-badge strong {
    color: var(--text-secondary, #ccc);
}

/* ─── Dossier Quality Indicator ────────────────────────────── */
.lum-quality-indicator {
    background: rgba(255,255,255,0.02);
    border: 1px solid var(--border-subtle, #333);
    border-radius: 10px;
    padding: 0.75rem 1rem;
    margin-bottom: 1rem;
}
.lum-quality-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.5rem;
}
.lum-quality-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-secondary, #ccc);
}
.lum-quality-score {
    font-size: 0.7rem;
    color: var(--text-muted, #888);
}
.lum-quality-categories {
    display: flex;
    flex-wrap: wrap;
    gap: 0.3rem;
}
.lum-quality-cat {
    font-size: 0.68rem;
    padding: 0.15rem 0.4rem;
    border-radius: 4px;
    background: rgba(255,255,255,0.04);
    color: var(--text-muted, #888);
}
.lum-quality-cat.filled {
    background: rgba(74,222,128,0.1);
    color: #4ade80;
}
.lum-quality-cat.missing {
    background: rgba(255,255,255,0.03);
    color: var(--text-muted, #666);
}
.lum-quality-run-btn {
    margin-top: 0.5rem;
    background: rgba(139,92,246,0.12);
    border: 1px solid rgba(139,92,246,0.25);
    color: #c4b5fd;
    border-radius: 6px;
    padding: 0.35rem 0.75rem;
    font-size: 0.72rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}
.lum-quality-run-btn:hover { background: rgba(139,92,246,0.2); }
.lum-quality-run-btn:focus-visible { outline: 2px solid #8B5CF6; outline-offset: 2px; }

/* ══════════════════════════════════════════════════════════════
   CAMPAIGN ORCHESTRATOR
   ══════════════════════════════════════════════════════════════ */

.co-fullscreen {
    position: fixed;
    inset: 0;
    z-index: 10000;
    background: var(--bg-deep, #0a0a0f);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.co-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.85rem 1.5rem;
    border-bottom: 1px solid rgba(212,168,83,0.12);
    background: linear-gradient(135deg, rgba(212,168,83,0.06), rgba(139,92,246,0.03));
    flex-shrink: 0;
}

.co-title {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--gold-primary);
    letter-spacing: 1.5px;
    margin: 0;
}

.co-subtitle {
    font-size: 0.72rem;
    color: var(--text-muted);
    margin-top: 2px;
}

.co-close-btn {
    background: rgba(255,255,255,0.05);
    border: 1px solid var(--border-subtle);
    color: var(--text-muted);
    width: 32px;
    height: 32px;
    border-radius: 8px;
    font-size: 1.2rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s;
}
.co-close-btn:hover { background: rgba(239,68,68,0.1); color: #ef4444; border-color: rgba(239,68,68,0.3); }
.co-close-btn:focus-visible { outline: 2px solid var(--gold-primary); outline-offset: 2px; }

.co-operation-badge {
    font-size: 0.72rem;
    font-weight: 600;
    padding: 3px 10px;
    border-radius: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Step Indicator */
.co-steps {
    display: flex;
    align-items: center;
    padding: 0.5rem 1.25rem;
    gap: 2px;
    border-bottom: 1px solid rgba(255,255,255,0.06);
    background: rgba(0,0,0,0.2);
    overflow-x: auto;
    flex-shrink: 0;
    scrollbar-width: none;
}
.co-steps::-webkit-scrollbar { display: none; }

.co-step {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 0.68rem;
    font-weight: 600;
    color: var(--text-muted);
    background: transparent;
    white-space: nowrap;
    transition: all 0.2s;
    border: 1px solid transparent;
}

.co-step.active {
    background: rgba(212,168,83,0.12);
    color: var(--gold-primary);
    border-color: rgba(212,168,83,0.25);
}

.co-step.complete {
    background: rgba(74,222,128,0.06);
    color: #4ade80;
}

.co-step-num {
    width: 17px;
    height: 17px;
    border-radius: 50%;
    background: rgba(255,255,255,0.06);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.6rem;
}

.co-step.active .co-step-num { background: rgba(212,168,83,0.2); }
.co-step.complete .co-step-num { background: rgba(74,222,128,0.15); }

.co-step-connector {
    width: 12px;
    height: 1px;
    background: rgba(255,255,255,0.08);
    flex-shrink: 0;
}

/* Body */
.co-body {
    flex: 1;
    overflow-y: auto;
    padding: 1.5rem;
}

/* Footer */
.co-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.65rem 1.5rem;
    border-top: 1px solid rgba(255,255,255,0.06);
    background: rgba(0,0,0,0.15);
    flex-shrink: 0;
}

/* Buttons */
.co-btn {
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: all 0.15s;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.co-btn:disabled { opacity: 0.4; cursor: not-allowed; }
.co-btn:focus-visible { outline: 2px solid var(--gold-primary); outline-offset: 2px; }

.co-btn-gold {
    background: linear-gradient(135deg, #D4A853, #c49a48);
    color: #0f1117;
}
.co-btn-gold:hover:not(:disabled) { transform: translateY(-1px); box-shadow: 0 4px 12px rgba(212,168,83,0.3); }

.co-btn-secondary {
    background: rgba(255,255,255,0.05);
    border: 1px solid var(--border-subtle);
    color: var(--text-secondary);
}
.co-btn-secondary:hover:not(:disabled) { background: rgba(255,255,255,0.08); }

.co-btn-danger {
    background: rgba(239,68,68,0.1);
    border: 1px solid rgba(239,68,68,0.3);
    color: #ef4444;
}
.co-btn-danger:hover { background: rgba(239,68,68,0.2); }

/* Campaign Type Toggle */
.co-type-toggle {
    display: inline-flex;
    gap: 3px;
    background: rgba(255,255,255,0.03);
    border-radius: 10px;
    padding: 3px;
    border: 1px solid rgba(255,255,255,0.08);
}

.co-type-btn {
    padding: 7px 20px;
    border: 1px solid transparent;
    border-radius: 8px;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-muted);
    background: transparent;
    cursor: pointer;
    transition: all 0.15s;
}
.co-type-btn:hover:not(.active) { color: var(--text-secondary); }
.co-type-btn.active {
    background: rgba(212,168,83,0.12);
    color: var(--gold-primary);
    border-color: rgba(212,168,83,0.25);
}

/* Org Grid */
.co-org-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 6px;
    max-height: 55vh;
    overflow-y: auto;
    padding-right: 4px;
}

.co-org-card {
    background: var(--bg-card);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 10px;
    padding: 10px 14px;
    cursor: pointer;
    transition: all 0.15s;
    border-left: 3px solid transparent;
}
.co-org-card:hover { background: rgba(255,255,255,0.04); border-color: rgba(255,255,255,0.1); }
.co-org-card.selected { border-color: var(--gold-primary); background: rgba(212,168,83,0.06); border-left-color: var(--gold-primary); }

.co-org-check {
    width: 18px;
    height: 18px;
    border-radius: 4px;
    border: 1.5px solid rgba(255,255,255,0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    color: var(--gold-primary);
    flex-shrink: 0;
    transition: all 0.15s;
}
.co-org-card.selected .co-org-check { background: rgba(212,168,83,0.2); border-color: var(--gold-primary); }

/* Progress */
.co-progress-overlay {
    max-width: 700px;
    margin: 0 auto;
    padding-top: 2rem;
}

.co-progress-bar {
    height: 4px;
    background: rgba(255,255,255,0.05);
    border-radius: 2px;
    overflow: hidden;
}

.co-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--gold-primary), #8B5CF6);
    transition: width 0.3s ease;
    border-radius: 2px;
}

/* Log */
.co-log-container {
    max-height: 400px;
    overflow-y: auto;
    font-family: 'Courier New', monospace;
    font-size: 0.75rem;
    padding: 1rem;
    background: rgba(0,0,0,0.2);
    border-radius: 8px;
    border: 1px solid var(--border-subtle);
    line-height: 1.6;
}

.co-log-entry {
    padding: 2px 0;
    border-bottom: 1px solid rgba(255,255,255,0.02);
}

/* Review Cards */
.co-review-card {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: 12px;
    padding: 1rem;
    margin-bottom: 0.75rem;
    transition: border-color 0.15s;
}
.co-review-card.approved { border-color: rgba(74,222,128,0.3); }
.co-review-card.failed { border-color: rgba(239,68,68,0.2); opacity: 0.7; }

/* Stat Pills */
.co-stat-pill {
    font-size: 0.78rem;
    font-weight: 600;
    padding: 4px 12px;
    border-radius: 16px;
}

/* ══════════════════════════════════════════════════════════════
   MESSAGING UPGRADE — Smart Reply, Grouping, Animations
   ══════════════════════════════════════════════════════════════ */

/* Smart Reply Pills */
.smart-reply-pills {
    padding: 8px 12px;
    border-top: 1px solid rgba(212,168,83,0.1);
    background: rgba(212,168,83,0.03);
}

.smart-reply-label {
    font-size: 0.7rem;
    color: var(--text-muted);
    margin-right: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.smart-reply-pill {
    background: rgba(212,168,83,0.08);
    border: 1px solid rgba(212,168,83,0.2);
    border-radius: 20px;
    padding: 5px 14px;
    font-size: 0.78rem;
    color: var(--gold-primary);
    cursor: pointer;
    transition: all 0.15s;
    white-space: nowrap;
}
.smart-reply-pill:hover { background: rgba(212,168,83,0.15); transform: translateY(-1px); }
.smart-reply-pill:focus-visible { outline: 2px solid var(--gold-primary); outline-offset: 2px; }

/* Message Animations */
.msg-enter {
    animation: msgFadeSlideIn 0.25s ease-out;
}
@keyframes msgFadeSlideIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Message Avatars */
.msg-avatar {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.65rem;
    font-weight: 700;
    flex-shrink: 0;
}
.msg-avatar-luminary { background: linear-gradient(135deg, #D4A853, #b8860b); color: #0f1117; }
.msg-avatar-partner { background: linear-gradient(135deg, #8B5CF6, #6D28D9); color: white; }

/* Message Grouping */
.msg-group-continuation {
    margin-top: 2px;
    padding-left: 42px;
}
.msg-group-continuation .message-header { display: none; }

/* Typing Indicator */
.typing-indicator {
    display: flex;
    gap: 4px;
    padding: 8px 16px;
    align-items: center;
}
.typing-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--text-muted);
    animation: typingBounce 1.2s infinite;
}
.typing-dot:nth-child(2) { animation-delay: 0.2s; }
.typing-dot:nth-child(3) { animation-delay: 0.4s; }
@keyframes typingBounce {
    0%, 60%, 100% { transform: translateY(0); }
    30% { transform: translateY(-6px); }
}

/* AI Draft Panel (Comms Center) */
.comms-ai-draft-panel {
    background: var(--bg-card);
    border: 1px solid rgba(212,168,83,0.2);
    border-radius: 12px;
    padding: 1rem;
    margin: 0.75rem 0;
}

.comms-ai-draft-toolbar {
    display: flex;
    gap: 6px;
    margin-bottom: 0.75rem;
}

.comms-ai-draft-tone {
    padding: 4px 12px;
    border-radius: 16px;
    font-size: 0.75rem;
    border: 1px solid var(--border-subtle);
    background: rgba(255,255,255,0.03);
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.15s;
}
.comms-ai-draft-tone.active,
.comms-ai-draft-tone:hover {
    background: rgba(212,168,83,0.1);
    border-color: rgba(212,168,83,0.3);
    color: var(--gold-primary);
}

/* Message Empty State */
.msg-empty-state {
    text-align: center;
    padding: 3rem 1.5rem;
    color: var(--text-muted);
    font-size: 0.85rem;
}

/* Jump to Latest */
.msg-jump-latest {
    position: sticky;
    bottom: 8px;
    margin: 0 auto;
    width: fit-content;
    display: flex;
    background: var(--bg-card);
    border: 1px solid var(--gold-primary);
    border-radius: 20px;
    padding: 4px 14px;
    font-size: 0.72rem;
    color: var(--gold-primary);
    cursor: pointer;
    transition: all 0.15s;
    z-index: 5;
}
.msg-jump-latest:hover { background: rgba(212,168,83,0.08); }

/* Attachment Cards */
.msg-attachment-card {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    background: rgba(255,255,255,0.03);
    border: 1px solid var(--border-subtle);
    border-radius: 8px;
    margin-top: 6px;
    max-width: 280px;
}

.msg-attachment-icon {
    width: 36px;
    height: 36px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    background: rgba(212,168,83,0.08);
    flex-shrink: 0;
}

/* ═══════════════════════════════════════════════════
   PROPOSAL WORKFLOW PIPELINE (.pw-*)
   6-stage workflow: Planning → Research → Design →
   Personalization → Sequencing → Delivery
   ═══════════════════════════════════════════════════ */

/* Fullscreen Panel */
.pw-fullscreen {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 10001;
    background: var(--bg-primary, #0a0b0f);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* Header */
.pw-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 1.5rem;
    border-bottom: 1px solid rgba(255,255,255,0.06);
    background: rgba(0,0,0,0.3);
    flex-shrink: 0;
}

.pw-header-icon {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    background: linear-gradient(135deg, rgba(212,168,83,0.3), rgba(139,92,246,0.2));
    display: flex;
    align-items: center;
    justify-content: center;
}

.pw-title {
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 1.5px;
    color: var(--gold-primary);
    margin: 0;
    text-transform: uppercase;
}

.pw-subtitle {
    font-size: 0.72rem;
    color: var(--text-muted);
}

.pw-close-btn {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    border: 1px solid var(--border-subtle);
    background: transparent;
    color: var(--text-muted);
    font-size: 1.3rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s;
}
.pw-close-btn:hover { background: rgba(239,68,68,0.1); color: #ef4444; border-color: rgba(239,68,68,0.3); }

/* Stage Step Bar */
.pw-stages {
    display: flex;
    align-items: center;
    padding: 0.5rem 1.25rem;
    gap: 2px;
    border-bottom: 1px solid rgba(255,255,255,0.06);
    background: rgba(0,0,0,0.2);
    overflow-x: auto;
    flex-shrink: 0;
    scrollbar-width: none;
}
.pw-stages::-webkit-scrollbar { display: none; }

.pw-step {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 0.68rem;
    font-weight: 600;
    color: var(--text-muted);
    background: transparent;
    white-space: nowrap;
    transition: all 0.2s;
    border: 1px solid transparent;
    cursor: pointer;
}
.pw-step:hover { background: rgba(255,255,255,0.04); }

.pw-step.active {
    background: rgba(212,168,83,0.12);
    color: var(--gold-primary);
    border-color: rgba(212,168,83,0.25);
}

.pw-step.complete {
    background: rgba(74,222,128,0.06);
    color: #4ade80;
}

.pw-step-num {
    width: 17px;
    height: 17px;
    border-radius: 50%;
    background: rgba(255,255,255,0.06);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.6rem;
}

.pw-step.active .pw-step-num { background: rgba(212,168,83,0.2); }
.pw-step.complete .pw-step-num { background: rgba(74,222,128,0.15); }

.pw-step-connector {
    width: 12px;
    height: 1px;
    background: rgba(255,255,255,0.08);
    flex-shrink: 0;
}

.pw-step-icon {
    font-size: 0.85rem;
}

/* Body & Footer */
.pw-body {
    flex: 1;
    overflow-y: auto;
    padding: 0;
}

.pw-footer {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    padding: 0.65rem 1.5rem;
    border-top: 1px solid rgba(255,255,255,0.06);
    background: rgba(0,0,0,0.15);
    flex-shrink: 0;
}

/* Buttons */
.pw-btn {
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: all 0.15s;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.pw-btn:disabled { opacity: 0.4; cursor: not-allowed; }

.pw-btn-gold {
    background: linear-gradient(135deg, #D4A853, #c49a48);
    color: #0f1117;
}
.pw-btn-gold:hover:not(:disabled) { transform: translateY(-1px); box-shadow: 0 4px 12px rgba(212,168,83,0.3); }

.pw-btn-subtle {
    background: rgba(255,255,255,0.05);
    border: 1px solid var(--border-subtle);
    color: var(--text-secondary);
}
.pw-btn-subtle:hover { background: rgba(255,255,255,0.08); }

.pw-btn-icon {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 2px;
    border-radius: 4px;
    transition: all 0.15s;
}
.pw-btn-icon:hover { background: rgba(239,68,68,0.1); color: #ef4444; }

/* Inputs */
.pw-input {
    width: 100%;
    padding: 0.6rem 0.75rem;
    background: rgba(255,255,255,0.05);
    border: 1px solid var(--border-subtle);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 0.85rem;
    outline: none;
    transition: border-color 0.2s;
}
.pw-input:focus { border-color: rgba(212,168,83,0.4); }

.pw-textarea {
    width: 100%;
    padding: 0.5rem 0.75rem;
    background: rgba(255,255,255,0.05);
    border: 1px solid var(--border-subtle);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 0.8rem;
    outline: none;
    resize: vertical;
    font-family: inherit;
}
.pw-textarea:focus { border-color: rgba(212,168,83,0.4); }

.pw-select {
    width: 100%;
    padding: 0.5rem;
    background: rgba(255,255,255,0.05);
    border: 1px solid var(--border-subtle);
    border-radius: 6px;
    color: var(--text-primary);
    font-size: 0.8rem;
    outline: none;
}

.pw-inline-input {
    width: 100%;
    padding: 0.3rem 0.5rem;
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 4px;
    color: var(--text-primary);
    font-size: 0.85rem;
    font-weight: 600;
    outline: none;
}
.pw-inline-input:focus { border-color: rgba(212,168,83,0.3); background: rgba(255,255,255,0.06); }

.pw-inline-textarea {
    width: 100%;
    padding: 0.25rem 0.5rem;
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 4px;
    color: var(--text-secondary);
    font-size: 0.75rem;
    outline: none;
    resize: none;
    font-family: inherit;
}
.pw-inline-textarea:focus { border-color: rgba(212,168,83,0.3); }

.pw-inline-select {
    padding: 0.2rem 0.4rem;
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 4px;
    color: var(--text-muted);
    font-size: 0.7rem;
    outline: none;
    flex: 1;
}

/* Spinner */
.pw-spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(212,168,83,0.3);
    border-top-color: #D4A853;
    border-radius: 50%;
    animation: pw-spin 0.6s linear infinite;
}
@keyframes pw-spin { to { transform: rotate(360deg); } }

/* Badges */
.pw-mini-badge {
    font-size: 0.65rem;
    font-weight: 600;
    padding: 0.1rem 0.45rem;
    border-radius: 4px;
    white-space: nowrap;
}

.pw-approved-badge {
    font-size: 0.7rem;
    font-weight: 700;
    color: #D4A853;
    background: rgba(212,168,83,0.15);
    padding: 0.1rem 0.5rem;
    border-radius: 4px;
    margin-left: 0.5rem;
}

.pw-status-badge {
    font-size: 0.65rem;
    font-weight: 600;
    padding: 0.15rem 0.5rem;
    border-radius: 10px;
    text-transform: capitalize;
}
.pw-status-draft { background: rgba(148,163,184,0.15); color: #94a3b8; }
.pw-status-active { background: rgba(212,168,83,0.15); color: #D4A853; }
.pw-status-completed { background: rgba(74,222,128,0.15); color: #4ade80; }
.pw-status-archived { background: rgba(107,114,128,0.15); color: #6b7280; }

/* Panel Header */
.pw-panel-header {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 0.75rem;
    border-bottom: 1px solid rgba(255,255,255,0.06);
}

/* ── Workflow List ── */
.pw-workflow-list {
    max-width: 900px;
    margin: 0 auto;
}

.pw-workflow-grid {
    padding: 1rem;
    display: grid;
    gap: 0.75rem;
}

.pw-workflow-card {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: 10px;
    padding: 1rem 1.25rem;
    cursor: pointer;
    transition: all 0.2s;
}
.pw-workflow-card:hover { border-color: rgba(212,168,83,0.3); transform: translateY(-1px); box-shadow: 0 4px 12px rgba(0,0,0,0.3); }

/* ── Create Form ── */
.pw-org-grid {
    border: 1px solid var(--border-subtle);
    border-radius: 8px;
    background: rgba(0,0,0,0.2);
}

.pw-org-checkbox {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
    border-bottom: 1px solid rgba(255,255,255,0.04);
    cursor: pointer;
    transition: background 0.15s;
}
.pw-org-checkbox:hover { background: rgba(255,255,255,0.03); }
.pw-org-checkbox:last-child { border-bottom: none; }

.pw-org-checkbox input[type="checkbox"] {
    accent-color: #D4A853;
}

/* ── Outline Layout (Stage 1) ── */
.pw-outline-layout {
    display: grid;
    grid-template-columns: 260px 1fr 240px;
    height: 100%;
    overflow: hidden;
}

.pw-outline-left {
    border-right: 1px solid rgba(255,255,255,0.06);
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

.pw-outline-center {
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.pw-outline-right {
    border-left: 1px solid rgba(255,255,255,0.06);
    overflow-y: auto;
}

.pw-outline-guidance {
    padding: 0.75rem;
}

.pw-manifesto-panel {
    padding: 0.75rem;
    border-top: 1px solid rgba(255,255,255,0.06);
    flex: 1;
    overflow-y: auto;
}

/* Outline Sections */
.pw-outline-sections {
    flex: 1;
    overflow-y: auto;
    padding: 0.5rem;
}

.pw-outline-section {
    background: rgba(255,255,255,0.02);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 8px;
    margin-bottom: 0.5rem;
    transition: all 0.2s;
}
.pw-outline-section:hover { border-color: rgba(212,168,83,0.2); }
.pw-outline-section.approved { border-color: rgba(74,222,128,0.2); }

.pw-outline-section-header {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.4rem 0.5rem;
    border-bottom: 1px solid rgba(255,255,255,0.04);
}

.pw-outline-section-body {
    padding: 0.5rem;
}

.pw-drag-handle {
    cursor: grab;
    color: var(--text-muted);
    font-size: 0.8rem;
    padding: 0 0.15rem;
    user-select: none;
}
.pw-drag-handle:active { cursor: grabbing; }

.pw-section-type-badge, .pw-arc-badge {
    font-size: 0.6rem;
    font-weight: 600;
    padding: 0.1rem 0.4rem;
    border-radius: 4px;
    white-space: nowrap;
}

.pw-section-title {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

.pw-section-brief {
    font-size: 0.75rem;
    color: var(--text-secondary);
    line-height: 1.4;
}

/* Story Arc */
.pw-story-arc {
    padding: 0.75rem;
}

.pw-arc-flow {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.pw-arc-group {
    margin-bottom: 0.25rem;
}

.pw-arc-label {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.15rem;
}

.pw-arc-item {
    font-size: 0.72rem;
    color: var(--text-secondary);
    padding: 0.2rem 0.5rem;
    margin-left: 0.25rem;
    margin-bottom: 0.1rem;
}

.pw-arc-connector {
    text-align: center;
    color: var(--text-muted);
    font-size: 0.7rem;
    line-height: 1;
}

/* Version History */
.pw-version-history {
    padding: 0.5rem;
}

.pw-version-item {
    background: rgba(255,255,255,0.02);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 6px;
    padding: 0.5rem;
    margin-bottom: 0.35rem;
    cursor: pointer;
    transition: all 0.15s;
}
.pw-version-item:hover { border-color: rgba(212,168,83,0.25); background: rgba(212,168,83,0.05); }

/* ── Research Layout (Stage 2) ── */
.pw-research-layout {
    display: grid;
    grid-template-columns: 250px 1fr 280px;
    height: 100%;
    overflow: hidden;
}

.pw-research-left {
    border-right: 1px solid rgba(255,255,255,0.06);
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

.pw-research-center {
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.pw-research-right {
    border-left: 1px solid rgba(255,255,255,0.06);
    overflow-y: auto;
}

/* Org List */
.pw-org-list {
    flex: 1;
    overflow-y: auto;
}

.pw-org-item {
    padding: 0.6rem 0.75rem;
    border-bottom: 1px solid rgba(255,255,255,0.04);
    cursor: pointer;
    transition: background 0.15s;
}
.pw-org-item:hover { background: rgba(255,255,255,0.03); }
.pw-org-item.active { background: rgba(212,168,83,0.08); border-left: 3px solid var(--gold-primary); }

/* Research Categories */
.pw-research-cats {
    flex: 1;
    overflow-y: auto;
    padding: 0.5rem;
}

.pw-research-cat {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0.75rem;
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 6px;
    margin-bottom: 0.35rem;
    background: rgba(255,255,255,0.02);
}

.pw-freshness-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
}

/* Persona Card */
.pw-persona-card {
    padding: 0.75rem;
}

/* ── Personalization Layout (Stage 4) ── */
.pw-personalization-layout {
    display: grid;
    grid-template-columns: 280px 1fr 220px;
    height: 100%;
    overflow: hidden;
}

.pw-personalization-left {
    border-right: 1px solid rgba(255,255,255,0.06);
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

.pw-personalization-center {
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.pw-personalization-right {
    border-left: 1px solid rgba(255,255,255,0.06);
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

/* Token List */
.pw-token-list {
    flex: 1;
    overflow-y: auto;
    padding: 0.5rem;
}

.pw-token-item {
    background: rgba(255,255,255,0.02);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 6px;
    padding: 0.5rem;
    margin-bottom: 0.35rem;
    transition: border-color 0.15s;
}
.pw-token-item:hover { border-color: rgba(212,168,83,0.2); }

/* Preview Area */
.pw-preview-area {
    flex: 1;
    overflow-y: auto;
    padding: 0.75rem;
}

.pw-preview-header {
    padding: 0.5rem 0;
    border-bottom: 1px solid rgba(255,255,255,0.06);
    margin-bottom: 0.75rem;
}

.pw-token-preview-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 0.5rem;
}

.pw-token-preview-item {
    background: rgba(255,255,255,0.02);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 8px;
    padding: 0.6rem;
    transition: all 0.2s;
}
.pw-token-preview-item.filled { border-color: rgba(74,222,128,0.2); }
.pw-token-preview-item.empty { border-color: rgba(212,168,83,0.15); background: rgba(212,168,83,0.03); }

.pw-token-input {
    width: 100%;
    padding: 0.4rem 0.5rem;
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 4px;
    color: var(--text-primary);
    font-size: 0.8rem;
    outline: none;
    resize: vertical;
    font-family: inherit;
}
.pw-token-input:focus { border-color: rgba(212,168,83,0.3); background: rgba(255,255,255,0.06); }
.pw-token-input:disabled { opacity: 0.5; cursor: not-allowed; }

/* Prospect List */
.pw-prospect-list {
    flex: 1;
    overflow-y: auto;
}

.pw-prospect-item {
    padding: 0.5rem 0.6rem;
    border-bottom: 1px solid rgba(255,255,255,0.04);
    cursor: pointer;
    transition: background 0.15s;
}
.pw-prospect-item:hover { background: rgba(255,255,255,0.03); }
.pw-prospect-item.active { background: rgba(212,168,83,0.08); border-left: 3px solid var(--gold-primary); }

/* ══════════════════════════════════════
   Stage 5: Sequencing
   ══════════════════════════════════════ */

/* 3-column layout: Config | Prospects | Readiness */
.pw-sequencing-layout {
    display: grid;
    grid-template-columns: 260px 1fr 240px;
    height: 100%;
    overflow: hidden;
}
.pw-sequencing-left {
    border-right: 1px solid rgba(255,255,255,0.06);
    overflow-y: auto;
    padding: 0.5rem;
}
.pw-sequencing-center {
    overflow-y: auto;
}
.pw-sequencing-right {
    border-left: 1px solid rgba(255,255,255,0.06);
    overflow-y: auto;
    padding: 0.5rem;
}
.pw-sequencing-list {
    overflow-y: auto;
}
.pw-sequencing-config {
    padding: 0.25rem;
}
.pw-sequencing-readiness {
    padding: 0.25rem;
}

/* Scoring Config */
.pw-seq-section {
    padding: 0.6rem 0;
    border-bottom: 1px solid rgba(255,255,255,0.04);
}
.pw-seq-label {
    font-size: 0.7rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.4rem;
}
.pw-seq-total {
    font-size: 0.7rem;
    color: var(--text-muted);
    text-align: right;
    margin-bottom: 0.35rem;
}

/* Mode selector */
.pw-seq-mode-option {
    display: block;
    padding: 0.45rem 0.6rem;
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 6px;
    margin-bottom: 0.35rem;
    cursor: pointer;
    transition: all 0.15s;
}
.pw-seq-mode-option:hover { background: rgba(255,255,255,0.03); }
.pw-seq-mode-option.active {
    background: rgba(212,168,83,0.08);
    border-color: rgba(212,168,83,0.25);
}
.pw-seq-mode-label {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-primary);
}
.pw-seq-mode-desc {
    font-size: 0.65rem;
    color: var(--text-muted);
    margin-top: 0.1rem;
}

/* Weight sliders */
.pw-seq-weight-row {
    margin-bottom: 0.5rem;
}
.pw-seq-weight-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin-bottom: 0.15rem;
}
.pw-seq-weight-val {
    font-weight: 600;
    color: var(--gold-primary);
}
.pw-seq-slider {
    width: 100%;
    height: 4px;
    -webkit-appearance: none;
    appearance: none;
    background: rgba(255,255,255,0.08);
    border-radius: 2px;
    outline: none;
    cursor: pointer;
}
.pw-seq-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--gold-primary);
    cursor: pointer;
}
.pw-seq-slider::-moz-range-thumb {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--gold-primary);
    border: none;
    cursor: pointer;
}

/* Prospect groups */
.pw-seq-group {
    margin-bottom: 0.25rem;
}
.pw-seq-group-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0.75rem;
    background: rgba(255,255,255,0.02);
    border-bottom: 1px solid rgba(255,255,255,0.06);
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-secondary);
}
.pw-seq-group-count {
    font-size: 0.7rem;
    color: var(--text-muted);
    font-weight: 400;
}

/* Prospect row */
.pw-seq-prospect {
    display: grid;
    grid-template-columns: 40px 1fr 50px 80px 70px 70px;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
    border-bottom: 1px solid rgba(255,255,255,0.03);
    transition: background 0.15s;
}
.pw-seq-prospect:hover { background: rgba(255,255,255,0.02); }

.pw-seq-prospect-rank {
    font-size: 1rem;
    font-weight: 700;
    text-align: center;
}
.pw-seq-prospect-info { min-width: 0; }
.pw-seq-prospect-name {
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.pw-seq-prospect-meta {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    margin-top: 0.15rem;
}

/* Score circle */
.pw-seq-prospect-score { text-align: center; }
.pw-seq-score-circle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border: 2px solid;
    border-radius: 50%;
    font-size: 0.75rem;
    font-weight: 700;
}

/* Mini breakdown bars */
.pw-seq-breakdown {
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.pw-seq-breakdown-bar {
    height: 3px;
    background: rgba(255,255,255,0.06);
    border-radius: 2px;
    overflow: hidden;
}
.pw-seq-breakdown-fill {
    height: 100%;
    border-radius: 2px;
    transition: width 0.3s;
}

/* Readiness indicators */
.pw-seq-prospect-readiness {
    display: flex;
    gap: 3px;
}
.pw-seq-readiness-dot {
    font-size: 0.65rem;
    opacity: 0.3;
    transition: opacity 0.15s;
}
.pw-seq-readiness-dot.ready { opacity: 1; }

/* Readiness panel */
.pw-seq-readiness-overview {
    padding: 1rem 0.5rem;
    text-align: center;
}
.pw-seq-readiness-ring {
    position: relative;
    width: 80px;
    height: 80px;
    margin: 0 auto;
    border-radius: 50%;
    background: conic-gradient(
        var(--color) calc(var(--pct) * 1%),
        rgba(255,255,255,0.06) calc(var(--pct) * 1%)
    );
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}
.pw-seq-readiness-ring::before {
    content: '';
    position: absolute;
    inset: 6px;
    border-radius: 50%;
    background: var(--bg-primary);
}
.pw-seq-readiness-pct {
    position: relative;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-primary);
}
.pw-seq-readiness-label {
    position: relative;
    font-size: 0.6rem;
    color: var(--text-muted);
    text-transform: uppercase;
}

/* Gate bars */
.pw-seq-gate-list {
    padding: 0.5rem 0;
}
.pw-seq-gate-item {
    margin-bottom: 0.6rem;
}
.pw-seq-gate-header {
    display: flex;
    justify-content: space-between;
    font-size: 0.7rem;
    color: var(--text-secondary);
    margin-bottom: 0.2rem;
}
.pw-seq-gate-bar {
    height: 5px;
    background: rgba(255,255,255,0.06);
    border-radius: 3px;
    overflow: hidden;
}
.pw-seq-gate-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--gold-primary), #f59e0b);
    border-radius: 3px;
    transition: width 0.3s;
}

/* ══════════════════════════════════════
   Stage 6: Delivery
   ══════════════════════════════════════ */

.pw-delivery-layout {
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
}
.pw-delivery-top {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    padding: 1rem;
    border-bottom: 1px solid rgba(255,255,255,0.06);
}
.pw-delivery-bottom {
    flex: 1;
    overflow-y: auto;
}

/* Checklist items */
.pw-delivery-check {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.4rem 0.5rem;
    font-size: 0.8rem;
    color: var(--text-muted);
    border-radius: 4px;
}
.pw-delivery-check.passed { color: var(--text-secondary); }
.pw-delivery-check-icon { font-size: 0.9rem; }

/* Delivery stats */
.pw-delivery-stats {
    display: flex;
    gap: 0.75rem;
    padding: 0.5rem 0;
}
.pw-delivery-stat {
    flex: 1;
    text-align: center;
    padding: 0.5rem;
    background: rgba(255,255,255,0.02);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 6px;
}
.pw-delivery-stat-val {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--text-primary);
}
.pw-delivery-stat-label {
    font-size: 0.65rem;
    color: var(--text-muted);
    text-transform: uppercase;
}

/* Engagement metrics row */
.pw-engagement-metrics {
    display: flex;
    gap: 0.75rem;
    padding: 1rem;
}
.pw-engagement-metric {
    flex: 1;
    text-align: center;
    padding: 0.75rem 0.5rem;
    background: rgba(255,255,255,0.02);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 8px;
}
.pw-engagement-metric-icon { font-size: 1.3rem; margin-bottom: 0.25rem; }
.pw-engagement-metric-val { font-size: 1.5rem; font-weight: 700; }
.pw-engagement-metric-label { font-size: 0.65rem; color: var(--text-muted); text-transform: uppercase; margin-top: 0.15rem; }

/* Engagement table */
.pw-engagement-table { padding: 0 1rem 1rem; }
.pw-engagement-table-header {
    display: grid;
    grid-template-columns: 1fr 80px 60px 70px 50px 90px 80px;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
    border-bottom: 1px solid rgba(255,255,255,0.08);
    font-size: 0.65rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
.pw-engagement-table-row {
    display: grid;
    grid-template-columns: 1fr 80px 60px 70px 50px 90px 80px;
    gap: 0.5rem;
    padding: 0.45rem 0.75rem;
    border-bottom: 1px solid rgba(255,255,255,0.03);
    align-items: center;
    font-size: 0.8rem;
    color: var(--text-secondary);
    transition: background 0.15s;
}
.pw-engagement-table-row:hover { background: rgba(255,255,255,0.02); }

.pw-et-col { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ══════════════════════════════════════
   Prospect Manager Modal (Phase 4)
   ══════════════════════════════════════ */

.pw-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.6);
    z-index: 10001;
    display: flex;
    align-items: center;
    justify-content: center;
}
.pw-prospect-modal {
    background: var(--bg-primary);
    border: 1px solid var(--border-subtle);
    border-radius: 12px;
    width: 90%;
    max-width: 600px;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 60px rgba(0,0,0,0.4);
}
.pw-prospect-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--border-subtle);
}
.pw-prospect-modal-body {
    flex: 1;
    overflow-y: auto;
    padding: 1rem 1.25rem;
}
.pw-prospect-modal-footer {
    display: flex;
    gap: 0.75rem;
    padding: 0.75rem 1.25rem;
    border-top: 1px solid var(--border-subtle);
}
.pw-org-checkbox.pw-org-current {
    background: rgba(212,168,83,0.06);
    border-left: 3px solid var(--gold-primary);
}

/* ══════════════════════════════════════
   Supporting Documents (Phase 4)
   ══════════════════════════════════════ */

.pw-doc-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.3rem 0.5rem;
    background: rgba(255,255,255,0.02);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 4px;
    font-size: 0.75rem;
    color: var(--text-secondary);
}
.pw-doc-remove {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 0.9rem;
    padding: 0 0.25rem;
    line-height: 1;
    opacity: 0.5;
    transition: opacity 0.15s;
}
.pw-doc-remove:hover { opacity: 1; color: #f87171; }

/* ── Responsive ── */
@media (max-width: 900px) {
    .pw-outline-layout { grid-template-columns: 1fr; }
    .pw-outline-left, .pw-outline-right { border: none; border-bottom: 1px solid rgba(255,255,255,0.06); max-height: 200px; }
    .pw-research-layout { grid-template-columns: 1fr; }
    .pw-research-left, .pw-research-right { border: none; border-bottom: 1px solid rgba(255,255,255,0.06); max-height: 200px; }
    .pw-personalization-layout { grid-template-columns: 1fr; }
    .pw-personalization-left, .pw-personalization-right { border: none; border-bottom: 1px solid rgba(255,255,255,0.06); max-height: 200px; }
    .pw-sequencing-layout { grid-template-columns: 1fr; }
    .pw-sequencing-left, .pw-sequencing-right { border: none; border-bottom: 1px solid rgba(255,255,255,0.06); max-height: 250px; }
    .pw-delivery-top { grid-template-columns: 1fr; }
    .pw-engagement-table-header, .pw-engagement-table-row { grid-template-columns: 1fr 70px 50px 50px; }
    .pw-et-sections, .pw-et-faq, .pw-et-last { display: none; }
    .pw-prospect-modal { width: 95%; max-width: 100%; }
}

/* ═══════════════════════════════════════════════════════════════
   ORG-STAGE NAVIGATION + PROPOSAL WATCH + BROADCAST COMPOSER
   ═══════════════════════════════════════════════════════════════ */

/* Stage nav items */
.stage-nav-item {
    padding-left: 14px !important;
}
.stage-nav-item .stage-icon {
    font-size: 12px;
    margin-right: 2px;
}
.stage-nav-item:hover {
    background: rgba(255,255,255,0.04) !important;
}

/* Proposal-out org items */
.org-item.proposal-out {
    background: rgba(212,168,83,0.03);
}
.org-item.proposal-out:hover {
    background: rgba(212,168,83,0.06);
}

/* Broadcast overlay */
.broadcast-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.85);
    z-index: 9000;
    justify-content: center;
    align-items: flex-start;
    padding: 3vh 0;
    overflow-y: auto;
}
.broadcast-modal {
    background: #12122a;
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 14px;
    width: 720px;
    max-width: 95vw;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0,0,0,0.6);
}
.broadcast-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
}
.broadcast-section {
    padding: 16px 24px;
    border-bottom: 1px solid rgba(255,255,255,0.04);
}
.broadcast-label {
    display: block;
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: #888;
    margin-bottom: 10px;
}
.broadcast-segment-summary {
    padding: 10px 14px;
    border-radius: 8px;
    background: rgba(34,197,94,0.06);
    border: 1px solid rgba(34,197,94,0.2);
    font-size: 0.8rem;
    color: #22c55e;
}
.broadcast-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 24px;
    border-top: 1px solid rgba(255,255,255,0.08);
}

/* ── Immersive Proposal Preview ── */
.proposal-preview-overlay {
    position: fixed;
    inset: 0;
    z-index: 9100;
    background: #06060a;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    animation: ppCinematicIn 0.5s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}
@keyframes ppCinematicIn {
    from { opacity: 0; transform: scale(0.97); }
    to   { opacity: 1; transform: scale(1); }
}

/* Ambient gold glow layers */
.pp-ambient-glow {
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
    filter: blur(100px);
    opacity: 0.35;
}
.pp-glow-1 {
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(212,168,83,0.18) 0%, transparent 70%);
    top: -200px;
    right: -100px;
    animation: ppGlowDrift1 18s ease-in-out infinite alternate;
}
.pp-glow-2 {
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(184,146,63,0.12) 0%, transparent 70%);
    bottom: -150px;
    left: -80px;
    animation: ppGlowDrift2 22s ease-in-out infinite alternate;
}
@keyframes ppGlowDrift1 {
    from { transform: translate(0, 0) scale(1); }
    to   { transform: translate(-60px, 40px) scale(1.15); }
}
@keyframes ppGlowDrift2 {
    from { transform: translate(0, 0) scale(1); }
    to   { transform: translate(50px, -30px) scale(1.1); }
}

/* Admin top bar */
.proposal-preview-admin-bar {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 24px;
    background: linear-gradient(180deg, rgba(10,10,15,0.85), rgba(10,10,15,0.6));
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(212,168,83,0.12);
    flex-shrink: 0;
    animation: ppBarSlide 0.6s cubic-bezier(0.22, 1, 0.36, 1) 0.15s both;
}
@keyframes ppBarSlide {
    from { opacity: 0; transform: translateY(-10px); }
    to   { opacity: 1; transform: translateY(0); }
}
.pp-bar-left {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
    flex: 1;
}
.pp-bar-title {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1rem;
    font-weight: 500;
    color: var(--text-primary, #F5F5F5);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    letter-spacing: 0.02em;
}
.pp-bar-meta {
    font-size: 0.7rem;
    color: var(--text-muted, #666);
    letter-spacing: 0.03em;
}
.pp-bar-center {
    flex-shrink: 0;
    padding: 0 20px;
}
.pp-status-badge {
    padding: 4px 14px;
    border-radius: 20px;
    font-size: 0.6rem;
    font-weight: 700;
    letter-spacing: 1.2px;
    font-family: 'Space Grotesk', sans-serif;
}
.pp-bar-right {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}
.pp-close-btn {
    background: none;
    border: 1px solid rgba(255,255,255,0.1);
    color: var(--text-muted, #666);
    width: 32px;
    height: 32px;
    border-radius: 50%;
    font-size: 1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    margin-left: 4px;
}
.pp-close-btn:hover {
    background: rgba(248,113,113,0.1);
    border-color: rgba(248,113,113,0.3);
    color: #f87171;
}

/* ProposalViewer container — fills remaining space */
.proposal-preview-viewer {
    position: relative;
    z-index: 1;
    flex: 1;
    overflow: hidden;
    animation: ppViewerFade 0.7s cubic-bezier(0.22, 1, 0.36, 1) 0.25s both;
}
@keyframes ppViewerFade {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* Button styles for admin bar */
.btn-proposal-action {
    padding: 6px 14px;
    border-radius: 6px;
    border: none;
    cursor: pointer;
    font-size: 0.72rem;
    font-weight: 600;
    font-family: 'Space Grotesk', sans-serif;
    letter-spacing: 0.03em;
    transition: all 0.2s ease;
    background: linear-gradient(135deg, var(--gold-primary, #D4A853), var(--gold-dark, #B8923F));
    color: #0a0a0f;
    white-space: nowrap;
}
.btn-proposal-action:hover {
    filter: brightness(1.15);
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(212,168,83,0.25);
}
.btn-proposal-action.secondary {
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
    color: var(--text-secondary, #A0A0A0);
}
.btn-proposal-action.secondary:hover {
    background: rgba(255,255,255,0.1);
    border-color: rgba(255,255,255,0.2);
    color: var(--text-primary, #F5F5F5);
}

/* ===== ADMIN AI ASSISTANT ===== */
.admin-assistant{position:fixed;bottom:1.25rem;right:1.25rem;z-index:100000}
.assistant-orb{width:52px;height:52px;border-radius:50%;background:rgba(13,13,20,0.92);backdrop-filter:blur(16px);-webkit-backdrop-filter:blur(16px);border:1.5px solid rgba(212,168,83,0.2);cursor:pointer;display:flex;align-items:center;justify-content:center;color:#D4A853;box-shadow:0 4px 20px rgba(0,0,0,0.5),0 0 16px rgba(212,168,83,0.06);transition:all .35s cubic-bezier(.23,1,.32,1);position:relative;padding:0}
.assistant-orb:hover{transform:scale(1.1);border-color:rgba(212,168,83,0.4);box-shadow:0 6px 30px rgba(0,0,0,0.6),0 0 28px rgba(212,168,83,0.12)}
.assistant-orb:active{transform:scale(0.95)}
.assistant-orb-ring{position:absolute;inset:-5px;border-radius:50%;border:1px solid rgba(212,168,83,0.1);pointer-events:none;animation:assistRingPulse 4s ease-in-out infinite}
@keyframes assistRingPulse{0%,100%{transform:scale(1);opacity:.3}50%{transform:scale(1.18);opacity:.7}}
.assistant-orb.attention{animation:assistAttention 2s ease-in-out 3}
@keyframes assistAttention{0%,100%{box-shadow:0 4px 20px rgba(0,0,0,0.5),0 0 16px rgba(212,168,83,0.06)}50%{box-shadow:0 4px 20px rgba(0,0,0,0.5),0 0 40px rgba(212,168,83,0.3),0 0 60px rgba(212,168,83,0.1)}}
.assistant-status-dot{position:absolute;top:-2px;right:-2px;width:10px;height:10px;border-radius:50%;background:#D4A853;border:2px solid #0d0d14;display:none;box-shadow:0 0 8px rgba(212,168,83,0.4);animation:pulse 2s ease-in-out infinite}
.assistant-status-dot.active{display:block}
.assistant-tip{position:absolute;bottom:calc(100% + 10px);right:0;background:rgba(13,13,20,0.96);backdrop-filter:blur(16px);border:1px solid rgba(212,168,83,0.15);border-radius:10px;padding:8px 12px 8px 14px;display:flex;align-items:center;gap:8px;box-shadow:0 8px 30px rgba(0,0,0,0.5);animation:assistTipIn .4s cubic-bezier(.23,1,.32,1);max-width:300px}
.assistant-tip-text{font-size:.78rem;color:#A0A0A0;white-space:normal;line-height:1.4}
.assistant-tip-dismiss{background:none;border:none;color:#666;cursor:pointer;padding:2px 4px;font-size:1rem;line-height:1;border-radius:4px;transition:color .2s}
.assistant-tip-dismiss:hover{color:#F5F5F5}
@keyframes assistTipIn{from{opacity:0;transform:translateY(8px)}to{opacity:1;transform:translateY(0)}}
.assistant-panel{position:absolute;bottom:calc(100% + 12px);right:0;width:420px;height:560px;max-height:calc(100vh - 100px);background:rgba(13,13,20,0.98);border:1px solid rgba(212,168,83,0.12);border-radius:16px;box-shadow:0 24px 80px rgba(0,0,0,0.6),0 0 40px rgba(212,168,83,0.04);display:flex;flex-direction:column;overflow:hidden;animation:assistPanelIn .35s cubic-bezier(.23,1,.32,1)}
@keyframes assistPanelIn{from{opacity:0;transform:translateY(16px) scale(.95)}to{opacity:1;transform:translateY(0) scale(1)}}
.assistant-panel-header{display:flex;align-items:center;justify-content:space-between;padding:12px 16px;border-bottom:1px solid rgba(212,168,83,0.08);flex-shrink:0}
.assistant-panel-header-left{display:flex;align-items:center;gap:8px}
.assistant-panel-icon{width:28px;height:28px;border-radius:50%;background:linear-gradient(135deg,rgba(212,168,83,0.12),rgba(212,168,83,0.04));border:1px solid rgba(212,168,83,0.15);display:flex;align-items:center;justify-content:center;color:#D4A853}
.assistant-panel-title{font-family:'Space Grotesk',sans-serif;font-size:.85rem;font-weight:600;letter-spacing:.06em;color:#F5F5F5}
.assistant-panel-badge{font-size:.5rem;letter-spacing:.08em;text-transform:uppercase;color:rgba(212,168,83,0.6);background:rgba(212,168,83,0.06);border:1px solid rgba(212,168,83,0.1);padding:2px 6px;border-radius:10px}
.assistant-panel-close{background:none;border:none;color:#666;cursor:pointer;font-size:1.2rem;line-height:1;padding:4px 6px;border-radius:6px;transition:color .2s,background .2s}
.assistant-panel-close:hover{color:#F5F5F5;background:rgba(255,255,255,0.04)}
.assistant-chips{display:flex;flex-wrap:wrap;gap:6px;padding:10px 16px;border-bottom:1px solid rgba(212,168,83,0.06);flex-shrink:0}
.assistant-chip{padding:5px 12px;background:rgba(212,168,83,0.06);border:1px solid rgba(212,168,83,0.12);border-radius:16px;color:#A0A0A0;font-size:.72rem;cursor:pointer;transition:all .2s;white-space:nowrap;font-family:inherit}
.assistant-chip:hover{background:rgba(212,168,83,0.12);border-color:rgba(212,168,83,0.25);color:#D4A853}
.assistant-chat{flex:1;overflow-y:auto;padding:12px 16px;display:flex;flex-direction:column;gap:10px}
.assistant-chat::-webkit-scrollbar{width:4px}
.assistant-chat::-webkit-scrollbar-track{background:transparent}
.assistant-chat::-webkit-scrollbar-thumb{background:rgba(212,168,83,0.12);border-radius:2px}
.assistant-msg{max-width:92%;padding:10px 14px;border-radius:12px;font-size:.82rem;line-height:1.55;animation:assistSlideUp .3s ease}
@keyframes assistSlideUp{from{opacity:0;transform:translateY(6px)}to{opacity:1;transform:translateY(0)}}
.assistant-msg--assistant{align-self:flex-start;background:rgba(212,168,83,0.06);border:1px solid rgba(212,168,83,0.08);color:#F5F5F5}
.assistant-msg--user{align-self:flex-end;background:rgba(212,168,83,0.12);border:1px solid rgba(212,168,83,0.18);color:#F5F5F5}
.assistant-msg--action{align-self:center;background:rgba(74,222,128,0.06);border:1px solid rgba(74,222,128,0.12);color:rgba(74,222,128,0.9);font-size:.75rem;padding:6px 14px;border-radius:20px}
.assistant-input-area{position:relative;padding:12px 16px;border-top:1px solid rgba(212,168,83,0.08);flex-shrink:0}
.assistant-input-wrap{display:flex;align-items:center;background:rgba(255,255,255,0.03);border:1px solid rgba(212,168,83,0.1);border-radius:10px;padding:0 10px;transition:border-color .3s,box-shadow .3s}
.assistant-input-wrap:focus-within{border-color:rgba(212,168,83,0.3);box-shadow:0 0 0 3px rgba(212,168,83,0.06)}
.assistant-input{flex:1;background:none;border:none;outline:none;color:#F5F5F5;font-family:inherit;font-size:.85rem;padding:10px 4px}
.assistant-input::placeholder{color:#666}
.assistant-input-hint{font-size:.55rem;color:#666;background:rgba(255,255,255,0.04);border:1px solid rgba(255,255,255,0.08);border-radius:4px;padding:2px 6px;flex-shrink:0;font-family:inherit}
.assistant-results{position:absolute;bottom:100%;left:16px;right:16px;max-height:260px;overflow-y:auto;background:rgba(13,13,20,0.98);border:1px solid rgba(212,168,83,0.12);border-radius:10px;box-shadow:0 -8px 30px rgba(0,0,0,0.5);margin-bottom:6px}
.assistant-result{padding:10px 14px;cursor:pointer;display:flex;align-items:center;gap:10px;transition:background .15s;border-bottom:1px solid rgba(255,255,255,0.03)}
.assistant-result:last-child{border-bottom:none}
.assistant-result:hover,.assistant-result.selected{background:rgba(212,168,83,0.08)}
.assistant-result-icon{width:28px;height:28px;border-radius:8px;background:rgba(212,168,83,0.08);display:flex;align-items:center;justify-content:center;font-size:.85rem;flex-shrink:0}
.assistant-result-text{flex:1;min-width:0}
.assistant-result-label{font-size:.82rem;color:#F5F5F5;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.assistant-result-desc{font-size:.7rem;color:#666}
.assistant-result-cat{font-size:.5rem;letter-spacing:.06em;text-transform:uppercase;color:#666;background:rgba(255,255,255,0.04);border-radius:8px;padding:2px 6px;flex-shrink:0}
@media(max-width:520px){.assistant-panel{width:calc(100vw - 2rem);right:-0.25rem;height:70vh}}

/* ═══════════════════════════════════════════════
   BIG BOARD
   ═══════════════════════════════════════════════ */

.bb-container {
    display: none;
    flex-direction: column;
    height: 100%;
    overflow-y: auto;
    padding: 1.5rem;
    gap: 1rem;
    background: linear-gradient(180deg, rgba(20,20,40,0.95) 0%, rgba(14,14,30,1) 100%);
    position: relative;
}
.bb-container::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: radial-gradient(ellipse at 20% 0%, rgba(212,168,83,0.04) 0%, transparent 50%),
                radial-gradient(ellipse at 80% 100%, rgba(139,92,246,0.03) 0%, transparent 50%);
    pointer-events: none;
    z-index: 0;
}
.bb-container > * { position: relative; z-index: 1; }

.bb-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px 12px;
    background: linear-gradient(135deg, rgba(212,168,83,0.06) 0%, rgba(139,92,246,0.04) 50%, rgba(34,197,94,0.03) 100%);
    border-bottom: 1px solid rgba(212,168,83,0.12);
    border-radius: 16px 16px 0 0;
}

.bb-title {
    font-family: 'Space Grotesk', 'Inter', sans-serif;
    font-size: 1.4rem;
    font-weight: 700;
    background: linear-gradient(135deg, #D4A853, #f0d080, #D4A853);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: 0.03em;
    text-shadow: 0 0 30px rgba(212,168,83,0.2);
}

/* ── Source of Truth — Sales War Room Layout ── */
.bb-truth {
    display: flex;
    flex-direction: column;
    gap: 2px;
    margin-bottom: 12px;
    border-radius: 14px;
    border: 1px solid rgba(212,168,83,0.12);
}
.bb-truth-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1px;
    background: rgba(255,255,255,0.03);
}
.bb-truth-card {
    padding: 14px 16px;
    background: rgba(14,14,30,0.95);
    transition: all 0.15s ease;
    position: relative;
}
.bb-truth-card::after {
    content: '';
    position: absolute;
    bottom: 0; left: 16px; right: 16px;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.04), transparent);
}
.bb-truth-card[onclick] { cursor: pointer; }
.bb-truth-card[onclick]:hover {
    background: rgba(212,168,83,0.04);
}
.bb-truth-label {
    font-size: 0.58rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: rgba(255,255,255,0.35);
    margin-bottom: 2px;
    font-family: 'JetBrains Mono', 'Space Grotesk', monospace;
}
.bb-truth-value {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.6rem;
    font-weight: 800;
    color: #fff;
    line-height: 1.1;
    letter-spacing: -0.02em;
}
.bb-truth-detail {
    font-size: 0.62rem;
    color: rgba(255,255,255,0.4);
    margin-top: 4px;
    font-family: 'JetBrains Mono', monospace;
    letter-spacing: 0.01em;
}
.bb-truth-gap {
    border-left: 3px solid #ef4444;
    background: linear-gradient(135deg, rgba(239,68,68,0.04), rgba(14,14,30,0.95)) !important;
}
.bb-truth-goal {
    border-left: 3px solid #22c55e;
    background: linear-gradient(135deg, rgba(34,197,94,0.04), rgba(14,14,30,0.95)) !important;
}
.bb-truth-strategy {
    border-left: 3px solid #D4A853;
    background: linear-gradient(135deg, rgba(212,168,83,0.04), rgba(14,14,30,0.95)) !important;
}
.bb-truth-gaps {
    display: flex;
    flex-direction: column;
    gap: 3px;
    margin-top: 2px;
}
.bb-truth-gap-item {
    font-size: 0.68rem;
    color: rgba(255,255,255,0.6);
    line-height: 1.35;
    font-family: 'Inter', sans-serif;
}
.bb-gap-num {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 800;
    font-size: 0.82rem;
}
.bb-truth-bar {
    width: 100%;
    height: 4px;
    background: rgba(255,255,255,0.06);
    border-radius: 2px;
    overflow: hidden;
    margin-top: 6px;
}
.bb-truth-fill {
    height: 100%;
    border-radius: 2px;
    transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.bb-org-total {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-family: 'Space Grotesk', sans-serif;
}

/* Pipeline workflow steps — rich gradient design */
.bb-pipeline {
    display: flex;
    align-items: center;
    gap: 0;
    flex-wrap: wrap;
    background: linear-gradient(180deg, rgba(255,255,255,0.02) 0%, rgba(255,255,255,0) 100%);
    border-radius: 12px;
    padding: 4px;
}

.bb-pipe-step {
    flex: 1;
    min-width: 70px;
    text-align: center;
    padding: 12px 6px 10px;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    border-radius: 10px;
    background: rgba(255,255,255,0.015);
    border: 1px solid transparent;
}

.bb-pipe-step:hover {
    background: rgba(255,255,255,0.06);
    border-color: rgba(255,255,255,0.08);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

.bb-pipe-step.bb-pipe-active {
    background: linear-gradient(135deg, rgba(212,168,83,0.08), rgba(212,168,83,0.03));
    border-color: rgba(212,168,83,0.25);
    box-shadow: 0 0 20px rgba(212,168,83,0.08), inset 0 -2px 0 var(--gold-primary);
}

.bb-pipe-num {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.5rem;
    font-weight: 800;
    line-height: 1.2;
    text-shadow: 0 0 20px currentColor;
}

.bb-pipe-label {
    font-size: 0.62rem;
    color: rgba(255,255,255,0.45);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-top: 3px;
    font-weight: 600;
}

.bb-pipe-bar {
    height: 4px;
    border-radius: 3px;
    margin-top: 6px;
    opacity: 0.6;
    box-shadow: 0 0 8px currentColor;
}

.bb-pipe-active .bb-pipe-bar { opacity: 1; box-shadow: 0 0 12px currentColor; }

.bb-pipe-dim { opacity: 0.3; }
.bb-pipe-dim:hover { opacity: 0.8; }

.bb-pipe-arrow {
    color: rgba(212,168,83,0.3);
    font-size: 1rem;
    opacity: 0.5;
    padding: 0 2px;
    flex-shrink: 0;
}

.bb-pipe-sep {
    width: 1px;
    height: 28px;
    background: linear-gradient(180deg, transparent, rgba(212,168,83,0.3), transparent);
    margin: 0 8px;
    flex-shrink: 0;
}

/* Type filter chips — compact dense design */
.bb-type-chips {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
    margin-bottom: 10px;
    padding: 8px 0;
}
.bb-type-chip {
    display: flex;
    flex-direction: column;
    gap: 3px;
    padding: 8px 14px 6px;
    background: rgba(255,255,255,0.02);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.15s ease;
    user-select: none;
    min-width: 80px;
}
.bb-type-chip:hover {
    background: rgba(255,255,255,0.05);
    border-color: rgba(255,255,255,0.1);
}
.bb-type-chip-active {
    background: rgba(212,168,83,0.06);
    border-color: rgba(212,168,83,0.25);
    box-shadow: inset 0 0 0 1px rgba(212,168,83,0.15);
}
.bb-chip-top {
    display: flex;
    align-items: center;
    gap: 5px;
}
.bb-type-chip-dot {
    width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0;
    box-shadow: 0 0 6px currentColor;
    animation: bb-dot-pulse 3s infinite ease-in-out;
}
@keyframes bb-dot-pulse {
    0%, 100% { box-shadow: 0 0 6px currentColor; }
    50% { box-shadow: 0 0 12px currentColor, 0 0 20px currentColor; }
}
.bb-type-chip-count {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 0.9rem;
    font-weight: 800;
    color: var(--text-primary);
}
.bb-type-chip-label {
    font-size: 0.7rem;
    color: rgba(255,255,255,0.55);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 600;
}
.bb-chip-conv {
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.bb-chip-conv-bar {
    width: 100%;
    height: 4px;
    background: rgba(255,255,255,0.06);
    border-radius: 3px;
    overflow: hidden;
}
.bb-chip-conv-fill {
    height: 100%;
    border-radius: 3px;
    min-width: 1px;
    transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 0 8px rgba(16,185,129,0.4);
}
.bb-chip-conv-text {
    font-size: 0.6rem;
    color: rgba(255,255,255,0.35);
    white-space: nowrap;
    letter-spacing: 0.02em;
}

/* Government collapsible group */
.bb-gov-group {
    display: flex;
    align-items: center;
    gap: 6px;
    position: relative;
}
.bb-gov-parent {
    position: relative;
    padding-right: 18px;
}
.bb-gov-chevron {
    font-size: 0.55rem;
    color: rgba(255,255,255,0.35);
    margin-left: 2px;
    transition: transform 0.2s ease;
    display: inline-block;
}
.bb-gov-expanded .bb-gov-chevron {
    color: rgba(255,255,255,0.55);
}
.bb-gov-sub {
    min-width: 80px;
    padding: 6px 10px 5px;
    animation: bbGovSubFadeIn 0.2s ease;
}
.bb-gov-sub .bb-type-chip-count { font-size: 0.78rem; }
.bb-gov-sub .bb-type-chip-label { font-size: 0.65rem; }
.bb-gov-sub .bb-chip-conv-text { font-size: 0.52rem; }

@keyframes bbGovSubFadeIn {
    from { opacity: 0; transform: translateX(-6px); }
    to { opacity: 1; transform: translateX(0); }
}

/* Metrics row */
.bb-metrics-row {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.78rem;
    color: var(--text-secondary);
    padding: 10px 16px;
    background: linear-gradient(135deg, rgba(255,255,255,0.02), rgba(255,255,255,0.005));
    border: 1px solid rgba(255,255,255,0.04);
    border-radius: 10px;
    backdrop-filter: blur(4px);
}

.bb-metric strong { color: var(--gold-primary); font-weight: 700; }
.bb-date { color: var(--gold-primary); font-family: 'Space Grotesk', sans-serif; font-size: 0.72rem; letter-spacing: 0.03em; }

.bb-metric-sep { color: rgba(212,168,83,0.3); }

/* Controls */
.bb-controls {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.bb-search {
    flex: 1;
    min-width: 160px;
    padding: 7px 12px;
    background: var(--bg-input);
    border: 1px solid var(--border-subtle);
    border-radius: 6px;
    color: var(--text-primary);
    font-family: inherit;
    font-size: 0.85rem;
    outline: none;
}

.bb-search:focus { border-color: var(--gold-primary); }

.bb-select {
    padding: 7px 10px;
    background: var(--bg-input);
    border: 1px solid var(--border-subtle);
    border-radius: 6px;
    color: var(--text-primary);
    font-family: inherit;
    font-size: 0.8rem;
    outline: none;
    cursor: pointer;
}

.bb-select:focus { border-color: var(--gold-primary); }

/* Table */
.bb-table-wrap {
    flex: 1 0 300px;
    overflow-y: auto;
    border: 1px solid var(--border-subtle);
    border-radius: 8px;
    background: var(--bg-card);
}

.bb-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.82rem;
}

.bb-table thead {
    position: sticky;
    top: 0;
    z-index: 2;
}

.bb-table th {
    background: var(--bg-elevated);
    color: var(--text-muted);
    font-size: 0.68rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    padding: 8px 10px;
    text-align: left;
    border-bottom: 1px solid var(--border-subtle);
    font-family: 'Space Grotesk', sans-serif;
}

.bb-table td {
    padding: 10px 10px;
    border-bottom: 1px solid rgba(255,255,255,0.03);
    vertical-align: middle;
}

.bb-th-num { width: 36px; text-align: center; }
.bb-td-num { text-align: center; color: var(--text-muted); font-family: 'Space Grotesk', sans-serif; font-size: 0.72rem; }

.bb-td-name {
    font-weight: 600;
    color: var(--text-primary);
    max-width: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.bb-td-state {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 0.75rem;
    color: var(--text-secondary);
    text-align: center;
}

.bb-td-contacts {
    text-align: center;
    font-family: 'Space Grotesk', sans-serif;
    font-size: 0.78rem;
}

.bb-th-val { text-align: right; }

.bb-td-val {
    text-align: right;
    font-family: 'Space Grotesk', sans-serif;
    font-size: 0.78rem;
    color: var(--gold-primary);
}

.bb-row {
    cursor: pointer;
    transition: background 0.1s ease;
}

.bb-row:hover {
    background: rgba(212,168,83,0.06);
}

.bb-row:nth-child(even) {
    background: rgba(255,255,255,0.01);
}

.bb-row:nth-child(even):hover {
    background: rgba(212,168,83,0.06);
}

/* Type pill */
.bb-type-pill {
    font-size: 0.68rem;
    padding: 2px 7px;
    border: 1px solid;
    border-radius: 10px;
    white-space: nowrap;
    font-family: 'Space Grotesk', sans-serif;
}

/* Stage badge */
.bb-stage-badge {
    font-size: 0.68rem;
    padding: 2px 8px;
    border-radius: 10px;
    white-space: nowrap;
    font-weight: 600;
}

/* Research bar */
.bb-research-bar {
    display: inline-block;
    width: 48px;
    height: 5px;
    background: rgba(255,255,255,0.06);
    border-radius: 3px;
    overflow: hidden;
    vertical-align: middle;
    margin-right: 4px;
}

.bb-research-fill {
    height: 100%;
    border-radius: 3px;
    transition: width 0.2s ease;
}

.bb-research-pct {
    font-size: 0.68rem;
    font-family: 'Space Grotesk', sans-serif;
    color: var(--text-muted);
}

/* Research cell layout */
.bb-research-cell {
    display: flex;
    align-items: center;
    gap: 4px;
}

/* Next action button */
.bb-next-btn {
    padding: 3px 10px;
    border: 1px solid;
    border-radius: 4px;
    font-family: inherit;
    font-size: 0.68rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s ease;
    white-space: nowrap;
}
.bb-next-btn:hover {
    filter: brightness(1.3);
    transform: translateY(-1px);
}

/* Quick actions */
.bb-quick-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    padding-top: 4px;
}

.bb-action-btn {
    padding: 7px 14px;
    background: var(--bg-elevated);
    border: 1px solid var(--border-subtle);
    border-radius: 6px;
    color: var(--text-secondary);
    font-family: inherit;
    font-size: 0.78rem;
    cursor: pointer;
    transition: all 0.15s ease;
}

.bb-action-btn:hover {
    border-color: var(--gold-primary);
    color: var(--gold-primary);
    background: rgba(212,168,83,0.08);
}

.bb-action-btn.bb-action-primary {
    border-color: var(--gold-primary);
    color: var(--gold-primary);
    background: rgba(212,168,83,0.08);
}
.bb-action-btn.bb-action-primary:hover {
    background: rgba(212,168,83,0.16);
}

/* Scan progress bar */
.bb-scan-progress {
    position: relative;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 14px;
    margin: 6px 0;
    background: var(--bg-tertiary, #1a1a2e);
    border: 1px solid rgba(212,168,83,0.25);
    border-radius: 6px;
    font-size: 0.75rem;
    color: var(--text-secondary);
    overflow: hidden;
}
.bb-scan-progress-fill {
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    background: rgba(212,168,83,0.12);
    transition: width 0.3s ease;
    z-index: 0;
}
.bb-scan-progress-text {
    position: relative;
    z-index: 1;
    flex: 1;
}
.bb-scan-stop-btn {
    position: relative;
    z-index: 1;
    background: rgba(248,113,113,0.15);
    color: #f87171;
    border: 1px solid rgba(248,113,113,0.3);
    border-radius: 4px;
    padding: 3px 10px;
    font-size: 0.7rem;
    cursor: pointer;
}
.bb-scan-stop-btn:hover { background: rgba(248,113,113,0.25); }

/* Board subtitle (type context) */
.bb-subtitle {
    display: block;
    font-size: 0.78rem;
    color: var(--text-secondary);
    margin-top: 2px;
    font-family: inherit;
    letter-spacing: 0.01em;
}
.bb-subtitle strong { color: var(--gold-primary); }

/* Daily Briefing */
.bb-briefing {
    margin-bottom: 16px;
    padding: 16px;
    background: linear-gradient(145deg, rgba(212,168,83,0.04), rgba(139,92,246,0.02));
    border: 1px solid rgba(212,168,83,0.1);
    border-radius: 14px;
    backdrop-filter: blur(8px);
}
.bb-briefing-label {
    font-family: 'Space Grotesk', 'Inter', sans-serif;
    font-size: 0.72rem;
    font-weight: 700;
    color: rgba(212,168,83,0.7);
    letter-spacing: 0.1em;
    text-transform: uppercase;
    margin-bottom: 0;
}

/* ── Game Plan Header ── */
.bb-gp-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 14px;
}
.bb-gp-date {
    font-size: 0.72rem;
    color: var(--text-muted);
    font-family: 'Space Grotesk', 'Inter', sans-serif;
}

/* ── Conversion Funnel ── */
.bb-funnel {
    display: flex;
    align-items: center;
    gap: 0;
    margin-bottom: 16px;
    padding: 10px 0;
    border-bottom: 1px solid rgba(255,255,255,0.06);
}
.bb-funnel-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 6px 8px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.15s;
    position: relative;
    flex: 1;
}
.bb-funnel-step:hover { background: rgba(255,255,255,0.04); }
.bb-funnel-step-active { background: rgba(255,255,255,0.06); }
.bb-funnel-count {
    font-family: 'JetBrains Mono', monospace;
    font-size: 1rem;
    font-weight: 700;
    line-height: 1;
}
.bb-funnel-label {
    font-size: 0.55rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.03em;
    margin-top: 3px;
    white-space: nowrap;
}
.bb-funnel-arrow {
    color: rgba(255,255,255,0.15);
    font-size: 0.85rem;
    flex-shrink: 0;
    margin: 0 1px;
    line-height: 1;
}
.bb-funnel-step-opportunity { background: rgba(245,158,11,0.06); border-radius: 8px; }
.bb-funnel-step-opportunity .bb-funnel-count { color: #f59e0b !important; }
.bb-funnel-step-opportunity .bb-funnel-label { color: #f59e0b; opacity: 0.7; }

/* ── Priority Action Stack ── */
.bb-gp-stack { display: flex; flex-direction: column; gap: 6px; }
.bb-gp-tier-label {
    font-size: 0.62rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-top: 10px;
    margin-bottom: 2px;
}
.bb-gp-tier-label:first-child { margin-top: 0; }
.bb-gp-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    background: var(--bg-elevated);
    border: 1px solid var(--border-subtle);
    border-left: 3px solid;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.15s ease;
}
.bb-gp-row:hover {
    background: rgba(212,168,83,0.04);
    border-color: var(--gold-primary);
    border-left-color: inherit !important;
}
.bb-gp-row-icon { font-size: 1rem; flex-shrink: 0; }
.bb-gp-row-count {
    font-family: 'JetBrains Mono', monospace;
    font-size: 1rem;
    font-weight: 700;
    min-width: 28px;
}
.bb-gp-row-desc {
    font-size: 0.78rem;
    color: var(--text-secondary);
    white-space: nowrap;
    min-width: 100px;
}
.bb-gp-row-orgs {
    display: flex;
    gap: 6px;
    flex: 1;
    overflow: hidden;
}
.bb-gp-row-action {
    font-size: 0.7rem;
    font-weight: 600;
    white-space: nowrap;
    padding: 4px 10px;
    border-radius: 4px;
    border: 1px solid;
    background: transparent;
    cursor: pointer;
    transition: all 0.15s;
    flex-shrink: 0;
}
.bb-gp-row-action:hover { filter: brightness(1.2); }

/* ── Top Prospects ── */
.bb-gp-prospects {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 12px;
    padding-top: 10px;
    border-top: 1px solid rgba(255,255,255,0.06);
    flex-wrap: wrap;
}
.bb-gp-prospects-label {
    font-size: 0.65rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    white-space: nowrap;
    font-weight: 600;
}
.bb-gp-prospect {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.72rem;
    color: var(--gold-primary);
    cursor: pointer;
}
.bb-gp-prospect:hover { text-decoration: underline; }
.bb-gp-prospect-score {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.6rem;
    color: var(--text-muted);
    background: rgba(255,255,255,0.05);
    padding: 1px 5px;
    border-radius: 3px;
}

/* ── Organizational Spatial Map ── */
.bb-spatial {
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 12px;
    overflow: hidden;
    background: rgba(14,14,30,0.8);
}
.bb-spatial-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 14px;
    border-bottom: 1px solid rgba(255,255,255,0.04);
}
.bb-spatial-title {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.62rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: rgba(212,168,83,0.7);
}
.bb-spatial-meta {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.58rem;
    color: rgba(255,255,255,0.35);
}
.bb-spatial-canvas {
    position: relative;
    height: 220px;
    overflow: hidden;
}
.bb-spatial-lines {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    z-index: 0;
}
.bb-spatial-center {
    position: absolute;
    left: 50%; top: 50%;
    transform: translate(-50%, -50%);
    z-index: 2;
    text-align: center;
}
.bb-spatial-center-ring {
    width: 48px; height: 48px;
    border-radius: 50%;
    border: 2px solid rgba(212,168,83,0.4);
    background: radial-gradient(circle, rgba(212,168,83,0.1) 0%, transparent 70%);
    margin: 0 auto 4px;
    animation: bb-center-pulse 3s infinite ease-in-out;
}
@keyframes bb-center-pulse {
    0%, 100% { box-shadow: 0 0 10px rgba(212,168,83,0.15); }
    50% { box-shadow: 0 0 25px rgba(212,168,83,0.3); }
}
.bb-spatial-center-label {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 0.6rem;
    font-weight: 700;
    color: #D4A853;
    letter-spacing: 0.15em;
}
.bb-spatial-node {
    position: absolute;
    transform: translate(-50%, -50%);
    border-radius: 50%;
    border: 1.5px solid;
    background: rgba(14,14,30,0.9);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    z-index: 1;
    backdrop-filter: blur(4px);
}
.bb-spatial-node:hover {
    transform: translate(-50%, -50%) scale(1.12);
    box-shadow: 0 0 20px rgba(255,255,255,0.1);
    z-index: 3;
}
.bb-spatial-node-count {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1rem;
    font-weight: 800;
    line-height: 1;
}
.bb-spatial-node-label {
    font-size: 0.5rem;
    color: rgba(255,255,255,0.5);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 600;
}
.bb-spatial-node-value {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.45rem;
    color: rgba(255,255,255,0.3);
    margin-top: 1px;
}

/* ── Dashboard Two-Column Layout ── */
.bb-dashboard-row {
    display: flex;
    gap: 16px;
    margin-bottom: 16px;
    align-items: flex-start;
}
.bb-dashboard-col-map {
    flex: 0 0 42%;
    min-width: 0;
}
.bb-dashboard-col-brief {
    flex: 1;
    min-width: 0;
}
.bb-dashboard-col-map .bb-map-wrap {
    margin-bottom: 0;
}
@media (max-width: 1200px) {
    .bb-dashboard-row {
        flex-direction: column;
    }
    .bb-dashboard-col-map {
        flex: none;
        width: 100%;
    }
}

/* ── Campaign Summary (Big Board) ── */
.bb-campaigns-section {
    margin-top: 14px;
    padding-top: 12px;
    border-top: 1px solid rgba(255,255,255,0.06);
}
.bb-campaigns-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}
.bb-campaigns-title {
    font-size: 0.68rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-weight: 600;
}
.bb-campaigns-agg {
    display: flex;
    gap: 12px;
    align-items: center;
    font-size: 0.68rem;
}
.bb-campaigns-ready {
    color: #D4A853;
    font-weight: 600;
    animation: bb-pulse-ready 2s ease-in-out infinite;
}
@keyframes bb-pulse-ready {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.65; }
}
.bb-campaigns-stat {
    color: var(--text-muted);
}
.bb-campaigns-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 8px;
}
.bb-campaign-card {
    padding: 8px 10px;
    border-radius: 6px;
    background: rgba(255,255,255,0.025);
    cursor: pointer;
    transition: background 0.15s;
}
.bb-campaign-card:hover {
    background: rgba(255,255,255,0.06);
}
.bb-campaign-name-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
}
.bb-campaign-name {
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--text-primary, #f5f5f5);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.bb-campaign-badge {
    font-size: 0.58rem;
    padding: 1px 6px;
    border-radius: 3px;
    white-space: nowrap;
    font-weight: 600;
    letter-spacing: 0.03em;
}
.bb-campaign-progress {
    display: flex;
    align-items: center;
    gap: 8px;
}
.bb-campaign-bar {
    flex: 1;
    height: 4px;
    background: rgba(255,255,255,0.06);
    border-radius: 2px;
    display: flex;
    overflow: hidden;
}
.bb-campaign-bar-seg {
    height: 100%;
    min-width: 1px;
    transition: width 0.3s;
}
.bb-campaign-pct {
    font-size: 0.62rem;
    font-family: 'JetBrains Mono', monospace;
    color: var(--text-muted);
    white-space: nowrap;
}

/* US Coverage Map */
.bb-map-wrap { margin-bottom: 16px; }
.bb-map-header { display: flex; align-items: baseline; gap: 12px; margin-bottom: 8px; }
.bb-map-title { font-size: 0.72rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.08em; font-weight: 600; }
.bb-map-meta { font-size: 0.7rem; color: var(--text-muted); opacity: 0.7; }
.bb-map-grid { display: grid; grid-template-columns: repeat(11, 1fr); gap: 2px; margin-bottom: 8px; }
.bb-map-cell { aspect-ratio: 1; border-radius: 4px; display: flex; flex-direction: column; align-items: center; justify-content: center; font-size: 0.6rem; line-height: 1; position: relative; }
.bb-map-empty { background: transparent; }
.bb-map-state { cursor: pointer; transition: all 0.15s; border: 1px solid transparent; }
.bb-map-state:hover { border-color: #D4A853; transform: scale(1.08); z-index: 2; }
.bb-map-active { border-color: #D4A853 !important; box-shadow: 0 0 6px rgba(212,168,83,0.4); }
.bb-map-code { font-weight: 700; color: var(--text-primary); font-size: 0.65rem; letter-spacing: 0.02em; }
.bb-map-count { font-size: 0.65rem; font-weight: 700; color: rgba(255,255,255,0.8); margin-top: 1px; }
.bb-heat-0 { background: rgba(255,255,255,0.03); }
.bb-heat-0 .bb-map-code { color: var(--text-muted); opacity: 0.5; }
.bb-heat-0 .bb-map-count { color: var(--text-muted); opacity: 0.5; }
.bb-heat-1 { background: rgba(212,168,83,0.1); }
.bb-heat-2 { background: rgba(212,168,83,0.2); }
.bb-heat-3 { background: rgba(212,168,83,0.35); }
.bb-heat-3 .bb-map-code { color: #1a1a2e; }
.bb-heat-3 .bb-map-count { color: #1a1a2e; opacity: 0.8; }
.bb-heat-4 { background: rgba(212,168,83,0.55); }
.bb-heat-4 .bb-map-code { color: #1a1a2e; font-weight: 700; }
.bb-heat-4 .bb-map-count { color: #1a1a2e; font-weight: 700; }
.bb-heat-5 { background: rgba(212,168,83,0.8); }
.bb-heat-5 .bb-map-code { color: #1a1a2e; font-weight: 700; }
.bb-heat-5 .bb-map-count { color: #1a1a2e; font-weight: 700; }
.bb-map-legend { display: flex; gap: 10px; align-items: center; }
.bb-map-legend-item { display: flex; align-items: center; gap: 3px; font-size: 0.62rem; color: var(--text-muted); }
.bb-map-swatch { width: 12px; height: 12px; border-radius: 3px; flex-shrink: 0; }

/* (Game plan bar styles removed — replaced by funnel) */

/* Sortable table headers */
.bb-th-sortable { cursor: pointer; user-select: none; transition: color 0.15s; white-space: nowrap; }
.bb-th-sortable:hover { color: var(--gold-primary); }
.bb-th-sorted { color: var(--gold-primary); }

/* Row outreach status */
.bb-row-reached { border-left: 2px solid rgba(59,130,246,0.4); }
.bb-row-dialogue { border-left: 2px solid rgba(34,197,94,0.5); }
.bb-row-partner { border-left: 2px solid rgba(16,185,129,0.5); }

/* Email readiness dot */
.bb-td-email { text-align: center; }
.bb-email-dot { font-size: 0.85rem; }
.bb-email-yes { color: #10b981; }
.bb-email-no { color: #4b5563; }

/* Contact name cell */
.bb-td-contact-name {
    max-width: 140px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 0.78rem;
    color: var(--text-secondary);
}

/* Enrollment cell */
.bb-td-enroll {
    text-align: right;
    font-variant-numeric: tabular-nums;
    font-size: 0.82rem;
    color: var(--text-primary);
}

/* Media reach cell */
.bb-td-reach {
    text-align: right;
    font-variant-numeric: tabular-nums;
    font-size: 0.82rem;
    color: #FF6B35;
    font-weight: 600;
}

/* Est Users / size cell */
.bb-td-users {
    text-align: right;
    font-variant-numeric: tabular-nums;
    font-size: 0.82rem;
    color: var(--text-secondary);
    font-weight: 500;
}

/* Carnegie classification — text with clickable popup */
.bb-td-carnegie {
    max-width: 160px;
    position: relative;
    font-size: 0.75rem;
    color: var(--text-secondary);
}
.bb-carnegie-text {
    cursor: pointer;
    transition: color 0.15s;
    position: relative;
    display: inline-block;
    border-bottom: 1px dotted rgba(255,255,255,0.2);
}
.bb-carnegie-text:hover { color: var(--gold-primary); }
.bb-carnegie-na { color: rgba(255,255,255,0.15); }
.bb-th-class { white-space: nowrap; }
.bb-class-sup { font-size: 0.55rem; color: rgba(255,255,255,0.3); margin-left: 1px; vertical-align: super; cursor: help; }
.bb-carnegie-popup {
    display: none;
    position: absolute;
    bottom: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%);
    background: #1e293b;
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 8px;
    padding: 10px 14px;
    font-size: 0.78rem;
    color: rgba(255,255,255,0.85);
    white-space: normal;
    min-width: 200px;
    max-width: 300px;
    z-index: 100;
    box-shadow: 0 8px 24px rgba(0,0,0,0.4);
    line-height: 1.4;
    pointer-events: auto;
}
.bb-carnegie-popup.bb-popup-open { display: block; }
.bb-carnegie-popup::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 6px solid transparent;
    border-top-color: #1e293b;
}

/* Metadata cell */
.bb-td-meta {
    max-width: 140px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 0.78rem;
    color: var(--text-secondary);
}

/* Empty state */
.bb-empty {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* Back to board button */
.bb-back-btn {
    padding: 5px 12px;
    background: transparent;
    border: 1px solid var(--border-subtle);
    border-radius: 6px;
    color: var(--text-secondary);
    font-family: inherit;
    font-size: 0.78rem;
    cursor: pointer;
    margin-right: 12px;
    transition: all 0.15s ease;
}

.bb-back-btn:hover {
    border-color: var(--gold-primary);
    color: var(--gold-primary);
}

/* Batch select checkbox column */
.bb-th-check, .bb-td-check { width: 28px; text-align: center; padding: 0 4px !important; }
.bb-th-check input, .bb-td-check input { cursor: pointer; accent-color: #D4A853; width: 14px; height: 14px; }
.bb-row-selected { background: rgba(212,168,83,0.07) !important; }

/* Batch action bar */
.bb-batch-bar {
    display: flex; align-items: center; gap: 10px;
    padding: 10px 16px; margin-top: 12px;
    background: rgba(30,30,58,0.95); border: 1px solid rgba(212,168,83,0.3);
    border-radius: 8px;
}
.bb-batch-count { color: #D4A853; font-weight: 600; font-size: 0.82rem; margin-right: 6px; }
.bb-batch-btn {
    padding: 5px 12px; border-radius: 6px; font-size: 0.78rem; cursor: pointer;
    background: transparent; border: 1px solid rgba(255,255,255,0.15); color: #ccc;
    transition: all 0.15s;
}
.bb-batch-btn:hover { border-color: #D4A853; color: #D4A853; }
.bb-batch-primary { background: rgba(212,168,83,0.15); border-color: rgba(212,168,83,0.4); color: #D4A853; }
.bb-batch-primary:hover { background: rgba(212,168,83,0.25); }
.bb-batch-clear { color: #888; border-color: rgba(255,255,255,0.1); }
.bb-batch-clear:hover { color: #ef4444; border-color: rgba(239,68,68,0.3); }

/* Outreach contact tracking column */
.bb-contact-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 4px; vertical-align: middle; }
.bb-contact-fresh { background: #10b981; }
.bb-contact-warm { background: #f59e0b; }
.bb-contact-stale { background: #ef4444; }
.bb-contact-never { background: #4b5563; }
.bb-td-contact { font-size: 0.78rem; white-space: nowrap; color: var(--text-secondary); }

/* ─── Org Detail Slide-Out Panel ─── */
.bb-detail-panel {
    position: fixed;
    top: 0;
    right: -420px;
    width: 400px;
    height: 100vh;
    background: var(--bg-card);
    border-left: 1px solid var(--border-subtle);
    z-index: 150;
    overflow-y: auto;
    transition: right 0.25s ease;
    padding: 20px;
    box-shadow: -4px 0 20px rgba(0,0,0,0.3);
}
.bb-detail-panel.bb-detail-open { right: 0; }
.bb-detail-panel-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border-subtle);
}
.bb-detail-panel-name {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 4px;
}
.bb-detail-panel-close {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1.4rem;
    cursor: pointer;
    padding: 4px 8px;
    line-height: 1;
}
.bb-detail-panel-close:hover { color: var(--text-primary); }
.bb-detail-nav-btn {
    background: none; border: 1px solid var(--border-subtle); color: var(--text-muted);
    width: 24px; height: 24px; border-radius: 4px; cursor: pointer; font-size: 1rem;
    display: flex; align-items: center; justify-content: center; padding: 0;
}
.bb-detail-nav-btn:hover { color: var(--text-primary); border-color: var(--gold-primary); }
.bb-detail-section {
    margin-bottom: 14px;
    padding-bottom: 14px;
    border-bottom: 1px solid rgba(255,255,255,0.04);
}
.bb-detail-section-title {
    font-size: 0.68rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-family: 'Space Grotesk', sans-serif;
    margin-bottom: 8px;
}
.bb-priority-bar {
    height: 6px;
    background: rgba(255,255,255,0.06);
    border-radius: 3px;
    overflow: hidden;
}
.bb-priority-fill {
    height: 100%;
    border-radius: 3px;
    transition: width 0.3s ease;
}
.bb-contact-card {
    padding: 8px 10px;
    background: rgba(255,255,255,0.03);
    border-radius: 6px;
    margin-bottom: 6px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
}
.bb-contact-name { font-size: 0.82rem; font-weight: 600; color: var(--text-primary); }
.bb-contact-title { font-size: 0.72rem; color: var(--text-muted); }
.bb-mini-timeline-item {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin-bottom: 8px;
}
.bb-mini-tl-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--gold-primary);
    margin-top: 6px;
    flex-shrink: 0;
}
.bb-detail-actions {
    display: flex;
    gap: 8px;
    padding-top: 12px;
}
.bb-detail-action-btn {
    flex: 1;
    padding: 8px 12px;
    background: rgba(255,255,255,0.04);
    border: 1px solid var(--border-subtle);
    border-radius: 6px;
    color: var(--text-secondary);
    font-size: 0.78rem;
    cursor: pointer;
    font-family: 'Space Grotesk', sans-serif;
    transition: all 0.15s;
}
.bb-detail-action-btn:hover { background: rgba(212,168,83,0.1); border-color: var(--gold-primary); color: var(--gold-primary); }
.bb-detail-full-btn { background: rgba(212,168,83,0.08); border-color: rgba(212,168,83,0.3); color: var(--gold-primary); }
.bb-row-focused {
    background: rgba(212,168,83,0.1) !important;
    border-left: 3px solid var(--gold-primary);
}

/* ─── Priority Score Column ─── */
.bb-td-priority { text-align: center; width: 52px; }
.bb-priority-ring {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: conic-gradient(var(--pri-color) var(--pri-pct), rgba(255,255,255,0.06) var(--pri-pct));
    position: relative;
}
.bb-priority-ring::before {
    content: '';
    position: absolute;
    inset: 4px;
    border-radius: 50%;
    background: var(--bg-card);
}
.bb-priority-num {
    position: relative;
    z-index: 1;
    font-family: 'Space Grotesk', sans-serif;
    font-size: 0.6rem;
    font-weight: 700;
}

/* ─── Priority Clickable Popup ─── */
.bb-priority-clickable { cursor: pointer; position: relative; }
.bb-priority-clickable:hover { transform: scale(1.1); }
.bb-pri-popup {
    display: none;
    position: absolute;
    bottom: calc(100% + 10px);
    left: 50%;
    transform: translateX(-50%);
    background: #1e293b;
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 10px;
    padding: 14px 16px;
    min-width: 220px;
    z-index: 100;
    box-shadow: 0 8px 24px rgba(0,0,0,0.5);
    pointer-events: auto;
}
.bb-pri-popup.bb-popup-open { display: block; }
.bb-pri-popup::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 6px solid transparent;
    border-top-color: #1e293b;
}
.bb-pri-popup-title {
    font-size: 0.72rem;
    font-weight: 700;
    color: rgba(255,255,255,0.6);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 10px;
}
.bb-pri-popup-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
}
.bb-pri-popup-label {
    font-size: 0.75rem;
    color: rgba(255,255,255,0.7);
    width: 60px;
    flex-shrink: 0;
}
.bb-pri-popup-bar {
    flex: 1;
    height: 6px;
    background: rgba(255,255,255,0.08);
    border-radius: 3px;
    overflow: hidden;
}
.bb-pri-popup-fill {
    height: 100%;
    border-radius: 3px;
    transition: width 0.3s ease;
}
.bb-pri-popup-score {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 0.7rem;
    font-weight: 600;
    color: rgba(255,255,255,0.5);
    width: 38px;
    text-align: right;
    flex-shrink: 0;
}

/* ─── Campaign Status Badges ─── */
.bb-campaign-dot {
    display: inline-block;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    margin-left: 5px;
    vertical-align: middle;
}

/* ─── Saved Views ─── */
.bb-save-view-btn {
    background: none;
    border: 1px solid var(--border-subtle);
    color: var(--text-muted);
    border-radius: 6px;
    padding: 5px 10px;
    cursor: pointer;
    font-size: 0.85rem;
    transition: all 0.15s;
    margin-left: 6px;
}
.bb-save-view-btn:hover { border-color: var(--gold-primary); color: var(--gold-primary); }
.bb-views-select { max-width: 180px; }
.bb-delete-view-btn {
    background: none; border: 1px solid rgba(239,68,68,0.3); color: #ef4444;
    border-radius: 6px; padding: 5px 8px; cursor: pointer; font-size: 0.9rem;
    margin-left: 2px; line-height: 1; transition: all 0.15s ease;
}
.bb-delete-view-btn:hover { border-color: #ef4444; background: rgba(239,68,68,0.1); }

/* ─── Keyboard Navigation ─── */
.bb-row-kb-focus {
    background: rgba(212,168,83,0.08) !important;
    outline: 1px solid rgba(212,168,83,0.3);
    outline-offset: -1px;
}
.bb-kb-help {
    position: fixed;
    bottom: 16px;
    right: 16px;
    background: var(--bg-elevated, #2a2a3a);
    border: 1px solid var(--border-subtle);
    border-radius: 10px;
    padding: 16px 20px;
    z-index: 200;
    font-size: 0.78rem;
    color: var(--text-secondary);
    box-shadow: 0 8px 24px rgba(0,0,0,0.4);
    max-width: 260px;
}
.bb-kb-help-title { font-family: 'Space Grotesk', sans-serif; font-size: 0.82rem; font-weight: 600; color: var(--text-primary); margin-bottom: 8px; }
.bb-kb-help kbd {
    display: inline-block;
    padding: 1px 5px;
    background: rgba(255,255,255,0.06);
    border: 1px solid var(--border-subtle);
    border-radius: 3px;
    font-family: 'Space Grotesk', sans-serif;
    font-size: 0.68rem;
    color: var(--gold-primary);
    margin-right: 4px;
    min-width: 16px;
    text-align: center;
}
.bb-kb-row { display: flex; align-items: center; gap: 6px; margin-bottom: 4px; }

/* ─── Research Metadata Dots ─── */
.bb-research-cats { display: flex; gap: 2px; margin-top: 2px; }
.bb-research-cat-dot {
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: rgba(255,255,255,0.1);
}
.bb-rc-done { background: #10b981; }

/* ═══════════════════════════════════════════════
   PHASE 4: Intelligence Integration
   ═══════════════════════════════════════════════ */

/* Step 1: NL Command Bar feedback */
.bb-nl-feedback { font-size: 0.72rem; color: var(--gold-primary); font-style: italic; margin: -4px 0 6px 2px; padding: 0; }

/* Step 2: Comms Pulse Column */
.bb-td-comms { width: 72px; white-space: nowrap; font-size: 0.78rem; }
.bb-comms-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; vertical-align: middle; flex-shrink: 0; }
.bb-comms-days { font-family: 'Space Grotesk', sans-serif; font-size: 0.65rem; color: var(--text-muted); }
.bb-comms-channel { font-size: 0.6rem; color: var(--text-muted); vertical-align: middle; }

/* Step 3: Actionable Game Plan org links */
.bb-gp-org-list { display: flex; flex-wrap: wrap; gap: 2px 6px; margin-top: 4px; }
.bb-gp-org-link { font-size: 0.68rem; color: var(--gold-primary); cursor: pointer; text-decoration: none; transition: opacity 0.15s; }
.bb-gp-org-link:hover { text-decoration: underline; opacity: 0.85; }
.bb-gp-more { font-size: 0.65rem; color: var(--text-muted); font-style: italic; }
.bb-gp-do-all { background: none; border: 1px solid var(--gold-primary); color: var(--gold-primary); border-radius: 4px; padding: 1px 6px; font-size: 0.62rem; cursor: pointer; margin-top: 4px; transition: all 0.15s; }
.bb-gp-do-all:hover { background: var(--gold-primary); color: #000; }

/* Step 5: SVS dimension bars in detail panel */
.bb-svs-bars { margin-top: 8px; display: flex; flex-direction: column; gap: 3px; }
.bb-svs-bar { display: flex; align-items: center; gap: 6px; font-size: 0.68rem; }
.bb-svs-label { width: 52px; color: var(--text-muted); text-align: right; flex-shrink: 0; }
.bb-svs-track { flex: 1; height: 4px; background: rgba(255,255,255,0.08); border-radius: 2px; overflow: hidden; }
.bb-svs-fill { height: 100%; border-radius: 2px; transition: width 0.3s ease; }
.bb-svs-val { font-family: 'Space Grotesk', sans-serif; font-size: 0.62rem; color: var(--text-muted); width: 32px; flex-shrink: 0; }
.bb-priority-ring[title] { cursor: pointer; }

/* ─── Phase 4.5: Two-Tier Scan ─── */
.bb-meta-badge { display: inline-block; width: 14px; height: 14px; border-radius: 3px; font-size: 0.55rem; font-weight: 700; color: #fff; text-align: center; line-height: 14px; margin-right: 4px; flex-shrink: 0; opacity: 0.85; }
.bb-meta-tags { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 6px; }
.bb-meta-tag { padding: 2px 8px; background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.08); border-radius: 10px; font-size: 0.68rem; color: var(--text-secondary); white-space: nowrap; text-transform: capitalize; }
.bb-meta-keytag { border-color: rgba(167,139,250,0.3); color: #a78bfa; background: rgba(167,139,250,0.08); }
.bb-batch-quick { background: rgba(167,139,250,0.15); border-color: rgba(167,139,250,0.4); color: #a78bfa; }
.bb-batch-quick:hover { background: rgba(167,139,250,0.25); border-color: #a78bfa; }
.bb-action-quick { border-color: rgba(167,139,250,0.3); color: #a78bfa; background: rgba(167,139,250,0.08); }
.bb-action-quick:hover { background: rgba(167,139,250,0.15); border-color: #a78bfa; }
.bb-detail-quick { border-color: rgba(167,139,250,0.3); color: #a78bfa; }
.bb-detail-quick:hover { background: rgba(167,139,250,0.1); border-color: #a78bfa; color: #a78bfa; }

/* ─── Phase 2 Big Board Fix: Research Status Dot ─── */
.bb-research-status-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-right: 6px;
    vertical-align: middle;
    cursor: pointer;
    flex-shrink: 0;
    transition: transform 0.15s, box-shadow 0.15s;
}
.bb-research-status-dot:hover {
    transform: scale(1.5);
    box-shadow: 0 0 6px currentColor;
}

/* ─── Phase 2 Big Board Fix: Comms Status Badge ─── */
.bb-comms-status-badge {
    display: inline-block;
    padding: 2px 7px;
    border-radius: 10px;
    font-size: 0.68rem;
    font-weight: 600;
    white-space: nowrap;
    border: 1px solid;
    line-height: 1.3;
}
.bb-td-comms { white-space: nowrap; }
.bb-comms-days { font-size: 0.65rem; color: var(--text-muted); margin-left: 3px; }
.bb-comms-channel { font-size: 0.6rem; color: var(--text-muted); opacity: 0.6; }

/* ─── Phase 2 Big Board Fix: Fixed Floating Batch Bar ─── */
.bb-batch-bar-fixed {
    position: fixed !important;
    bottom: 16px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1000;
    padding: 12px 20px !important;
    margin: 0 !important;
    background: rgba(20,20,45,0.97) !important;
    border: 1px solid rgba(212,168,83,0.4) !important;
    border-radius: 12px !important;
    box-shadow: 0 8px 32px rgba(0,0,0,0.6), 0 0 12px rgba(212,168,83,0.15);
    backdrop-filter: blur(12px);
    max-width: 800px;
    animation: bbBatchSlideUp 0.2s ease-out;
}
@keyframes bbBatchSlideUp {
    from { opacity: 0; transform: translateX(-50%) translateY(20px); }
    to { opacity: 1; transform: translateX(-50%) translateY(0); }
}
.bb-batch-draft { background: rgba(59,130,246,0.15); border-color: rgba(59,130,246,0.4); color: #3b82f6; }
.bb-batch-draft:hover { background: rgba(59,130,246,0.25); border-color: #3b82f6; }

/* ─── Phase 2 Big Board Fix: Pipeline Funnel Enhancement ─── */
.bb-pipeline-funnel .bb-pipe-step {
    cursor: pointer;
    transition: all 0.15s;
}
.bb-pipeline-funnel .bb-pipe-step:hover {
    background: rgba(255,255,255,0.04);
    border-radius: 6px;
}
.bb-pipe-bar-wrap {
    width: 100%;
    height: 3px;
    background: rgba(255,255,255,0.05);
    border-radius: 2px;
    overflow: hidden;
    margin-top: 4px;
}
.bb-pipeline-funnel .bb-pipe-bar {
    height: 100%;
    border-radius: 2px;
    transition: width 0.3s ease;
}
.bb-pipeline-funnel .bb-pipe-arrow {
    color: rgba(255,255,255,0.2);
    font-size: 0.9rem;
}

/* Nav dot for pipeline items */
.bb-nav-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}

/* ═══════════════════════════════════════════════
   Phase 5: Type Pipeline Map Funnel
   ═══════════════════════════════════════════════ */
.bb-funnel { margin-bottom: 16px; }
.bb-funnel-header { display: flex; align-items: baseline; gap: 12px; margin-bottom: 10px; }
.bb-funnel-title { font-size: 0.78rem; font-weight: 600; color: var(--type-color, var(--gold-primary)); text-transform: uppercase; letter-spacing: 0.06em; }
.bb-funnel-total { font-size: 0.7rem; color: var(--text-muted); }

.bb-funnel-stages { display: flex; align-items: stretch; gap: 0; margin-bottom: 8px; background: rgba(255,255,255,0.02); border-radius: 8px; overflow: hidden; border: 1px solid rgba(255,255,255,0.06); }
.bb-funnel-stage { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 14px 6px 10px; cursor: pointer; transition: all 0.15s; position: relative; min-width: 0; }
.bb-funnel-stage:hover { background: rgba(255,255,255,0.04); }
.bb-funnel-active { background: rgba(255,255,255,0.06) !important; box-shadow: inset 0 -2px 0 var(--gold-primary); }
.bb-funnel-dim { opacity: 0.3; }
.bb-funnel-dim:hover { opacity: 0.65; }
.bb-funnel-icon { font-size: 1rem; margin-bottom: 2px; }
.bb-funnel-count { font-family: 'Space Grotesk', sans-serif; font-size: 1.15rem; font-weight: 700; line-height: 1; }
.bb-funnel-pct { font-size: 0.58rem; color: var(--text-muted); margin-top: 2px; }
.bb-funnel-label { font-size: 0.6rem; color: var(--text-secondary); margin-top: 4px; text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.bb-funnel-fill { position: absolute; bottom: 0; left: 0; height: 3px; border-radius: 0 0 2px 2px; transition: width 0.3s; }
.bb-funnel-arrow { display: flex; align-items: center; font-size: 1.2rem; color: var(--text-muted); opacity: 0.25; padding: 0 2px; }

.bb-funnel-refill { display: flex; align-items: center; gap: 8px; padding: 8px 12px; background: rgba(255,255,255,0.02); border: 1px dashed rgba(255,255,255,0.08); border-radius: 6px; font-size: 0.7rem; color: var(--text-muted); margin-bottom: 12px; }
.bb-funnel-refill-icon { font-size: 1rem; color: var(--gold-primary); }

.bb-pipeline-map-header { padding-left: 16px !important; }
.bb-pipeline-map-header .bb-title { display: flex; align-items: center; gap: 10px; }
.bb-subtitle { font-size: 0.72rem; color: var(--text-muted); font-weight: 400; }

.bb-metrics-row { display: flex; align-items: center; gap: 6px; font-size: 0.7rem; color: var(--text-muted); margin-bottom: 8px; flex-wrap: wrap; }
.bb-metric-sep { opacity: 0.3; }

/* (Type-specific gameplan bar removed — replaced by funnel) */

/* Type-colored heat map overrides */
.bb-map-type-university .bb-state-cell.heat-1 { background: rgba(212,168,83,0.12) !important; }
.bb-map-type-university .bb-state-cell.heat-2 { background: rgba(212,168,83,0.22) !important; }
.bb-map-type-university .bb-state-cell.heat-3 { background: rgba(212,168,83,0.38) !important; }
.bb-map-type-university .bb-state-cell.heat-4 { background: rgba(212,168,83,0.55) !important; }
.bb-map-type-university .bb-state-cell.heat-5 { background: rgba(212,168,83,0.8) !important; }

.bb-map-type-media .bb-state-cell.heat-1 { background: rgba(255,107,53,0.12) !important; }
.bb-map-type-media .bb-state-cell.heat-2 { background: rgba(255,107,53,0.22) !important; }
.bb-map-type-media .bb-state-cell.heat-3 { background: rgba(255,107,53,0.38) !important; }
.bb-map-type-media .bb-state-cell.heat-4 { background: rgba(255,107,53,0.55) !important; }
.bb-map-type-media .bb-state-cell.heat-5 { background: rgba(255,107,53,0.8) !important; }

.bb-map-type-government .bb-state-cell.heat-1 { background: rgba(34,197,94,0.12) !important; }
.bb-map-type-government .bb-state-cell.heat-2 { background: rgba(34,197,94,0.22) !important; }
.bb-map-type-government .bb-state-cell.heat-3 { background: rgba(34,197,94,0.38) !important; }
.bb-map-type-government .bb-state-cell.heat-4 { background: rgba(34,197,94,0.55) !important; }
.bb-map-type-government .bb-state-cell.heat-5 { background: rgba(34,197,94,0.8) !important; }

.bb-map-type-law_firm .bb-state-cell.heat-1 { background: rgba(167,139,250,0.12) !important; }
.bb-map-type-law_firm .bb-state-cell.heat-2 { background: rgba(167,139,250,0.22) !important; }
.bb-map-type-law_firm .bb-state-cell.heat-3 { background: rgba(167,139,250,0.38) !important; }
.bb-map-type-law_firm .bb-state-cell.heat-4 { background: rgba(167,139,250,0.55) !important; }
.bb-map-type-law_firm .bb-state-cell.heat-5 { background: rgba(167,139,250,0.8) !important; }

/* ─── Phase 6: Campaign Send System ─── */
.cs-queue-item:hover { background: rgba(236,72,153,0.06) !important; border-color: rgba(236,72,153,0.2) !important; }
#csPanel .pipeline-spinner { width: 20px; height: 20px; border: 2px solid rgba(236,72,153,0.2); border-top-color: #ec4899; border-radius: 50%; animation: pipelineSpin 0.8s linear infinite; display: inline-block; }
.cs-campaign-card { padding: 1rem; border: 1px solid var(--border-subtle); border-radius: 10px; cursor: pointer; transition: all 0.2s; border-left: 3px solid #ec4899; margin-bottom: 8px; }
.cs-campaign-card:hover { background: rgba(236,72,153,0.06); border-color: rgba(236,72,153,0.2); }
.cs-campaign-name { font-size: 0.9rem; font-weight: 600; color: var(--text-primary); }
.cs-campaign-desc { font-size: 0.75rem; color: var(--text-muted); margin-top: 4px; max-height: 40px; overflow: hidden; }
.cs-campaign-stats { display: flex; gap: 12px; margin-top: 8px; font-size: 0.7rem; }
.cs-campaign-status { font-size: 0.6rem; padding: 2px 8px; border-radius: 4px; font-weight: 600; letter-spacing: 0.5px; text-transform: uppercase; }
.cs-form-group { margin-bottom: 1rem; }
.cs-form-group label { display: block; font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.5px; color: var(--text-muted); margin-bottom: 6px; }
.cs-form-group input, .cs-form-group textarea, .cs-form-group select { width: 100%; padding: 10px 12px; background: var(--bg-secondary); border: 1px solid var(--border-subtle); border-radius: 8px; color: var(--text-primary); font-size: 0.85rem; font-family: inherit; }
.cs-form-group textarea { resize: vertical; min-height: 80px; line-height: 1.5; }
.cs-form-group select { appearance: auto; }
.cs-color-chips { display: flex; gap: 8px; flex-wrap: wrap; }
.cs-color-chip { width: 28px; height: 28px; border-radius: 50%; cursor: pointer; border: 2px solid transparent; transition: border-color 0.15s; }
.cs-color-chip.active { border-color: white; box-shadow: 0 0 0 2px rgba(255,255,255,0.2); }

/* ═══════════════════════════════════════════════
   BIG BOARD — Premium Command Center Overhaul
   ═══════════════════════════════════════════════ */

/* ── Container & Section Spacing ── */
.bb-container {
    gap: 1.25rem !important;
    padding: 1.75rem !important;
}

/* ── Pipeline Funnel Enhancement ── */
.bb-funnel-stages {
    background: rgba(255,255,255,0.025) !important;
    border: 1px solid rgba(255,255,255,0.08) !important;
    border-radius: 10px !important;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.03), 0 2px 8px rgba(0,0,0,0.15);
}

.bb-funnel-stage {
    padding: 18px 8px 14px !important;
    border-right: 1px solid rgba(255,255,255,0.04);
    transition: all 0.2s ease !important;
}
.bb-funnel-stage:last-child { border-right: none; }
.bb-funnel-stage:hover {
    background: rgba(255,255,255,0.06) !important;
}
.bb-funnel-active {
    background: rgba(212,168,83,0.06) !important;
    box-shadow: inset 0 -3px 0 var(--gold-primary) !important;
}

.bb-funnel-count {
    font-size: 1.8rem !important;
    font-weight: 800 !important;
    letter-spacing: -0.02em;
    text-shadow: 0 1px 3px rgba(0,0,0,0.3);
}

.bb-funnel-label {
    font-size: 0.65rem !important;
    letter-spacing: 0.04em;
    font-weight: 500;
    margin-top: 6px !important;
}

.bb-funnel-pct {
    font-size: 0.62rem !important;
    background: rgba(255,255,255,0.05);
    padding: 1px 6px;
    border-radius: 8px;
    margin-top: 4px !important;
}

.bb-funnel-icon {
    font-size: 1.15rem !important;
    margin-bottom: 4px !important;
    filter: drop-shadow(0 1px 2px rgba(0,0,0,0.3));
}

.bb-funnel-fill {
    height: 4px !important;
    border-radius: 0 0 3px 3px !important;
    box-shadow: 0 0 6px rgba(var(--fill-rgb, 212,168,83), 0.25);
}

.bb-funnel-arrow {
    font-size: 1rem !important;
    opacity: 0.2 !important;
    color: var(--gold-primary) !important;
}

/* Pipe step enhancement (legacy pipeline) */
.bb-pipe-step {
    padding: 14px 8px 10px !important;
    border-radius: 8px !important;
    background: rgba(255,255,255,0.02);
    border: 1px solid rgba(255,255,255,0.04);
    margin: 0 2px;
}
.bb-pipe-step:hover {
    background: rgba(255,255,255,0.06) !important;
    border-color: rgba(255,255,255,0.08);
}
.bb-pipe-step.bb-pipe-active {
    background: rgba(212,168,83,0.06) !important;
    border-color: rgba(212,168,83,0.15);
    box-shadow: inset 0 -3px 0 var(--gold-primary), 0 2px 8px rgba(212,168,83,0.08) !important;
}
.bb-pipe-num {
    font-size: 1.8rem !important;
    font-weight: 800 !important;
    letter-spacing: -0.02em;
}
.bb-pipe-label {
    font-size: 0.68rem !important;
    margin-top: 4px !important;
    letter-spacing: 0.05em !important;
}
.bb-pipe-bar {
    height: 5px !important;
    margin-top: 8px !important;
    opacity: 0.7 !important;
    border-radius: 3px !important;
}
.bb-pipe-active .bb-pipe-bar {
    opacity: 1 !important;
    box-shadow: 0 0 6px currentColor;
}
.bb-pipe-bar-wrap {
    height: 5px !important;
}

/* ── Type Filter Chips Enhancement ── */
.bb-type-chips {
    gap: 10px !important;
    margin-bottom: 16px !important;
    padding-bottom: 14px !important;
    border-bottom: 1px solid rgba(255,255,255,0.08) !important;
}

.bb-type-chip {
    padding: 10px 18px 9px !important;
    min-width: 100px !important;
    border-radius: 12px !important;
    background: rgba(255,255,255,0.035) !important;
    border: 1px solid rgba(255,255,255,0.06) !important;
    box-shadow: 0 1px 4px rgba(0,0,0,0.1);
    transition: all 0.2s ease !important;
}
.bb-type-chip:hover {
    background: rgba(255,255,255,0.07) !important;
    border-color: rgba(255,255,255,0.12) !important;
    transform: translateY(-1px);
    box-shadow: 0 3px 8px rgba(0,0,0,0.15);
}
.bb-type-chip-active {
    background: rgba(212,168,83,0.08) !important;
    border-color: rgba(212,168,83,0.3) !important;
    box-shadow: 0 0 12px rgba(212,168,83,0.12), 0 2px 6px rgba(0,0,0,0.15) !important;
}
.bb-type-chip-count {
    font-size: 0.95rem !important;
    font-weight: 800 !important;
}
.bb-type-chip-label {
    font-size: 0.72rem !important;
    letter-spacing: 0.05em !important;
}
.bb-type-chip-dot {
    width: 10px !important;
    height: 10px !important;
    box-shadow: 0 0 4px currentColor;
}
.bb-chip-conv-bar {
    height: 4px !important;
    background: rgba(255,255,255,0.08) !important;
    border-radius: 3px !important;
}
.bb-chip-conv-fill {
    border-radius: 3px !important;
}
.bb-chip-conv-text {
    font-size: 0.6rem !important;
}

/* Gov sub chips */
.bb-gov-sub {
    padding: 8px 12px 7px !important;
}

/* ── Metrics Row → Card Strip ── */
.bb-metrics-row {
    background: rgba(255,255,255,0.025) !important;
    border: 1px solid rgba(255,255,255,0.06) !important;
    border-radius: 8px !important;
    padding: 10px 16px !important;
    gap: 10px !important;
    font-size: 0.75rem !important;
    box-shadow: 0 1px 4px rgba(0,0,0,0.1);
}

/* ── Search Bar Enhancement ── */
.bb-search {
    min-width: 220px !important;
    padding: 9px 16px !important;
    font-size: 0.88rem !important;
    border-radius: 8px !important;
    background: rgba(255,255,255,0.04) !important;
    border: 1px solid rgba(255,255,255,0.1) !important;
    transition: all 0.2s ease !important;
}
.bb-search:focus {
    border-color: var(--gold-primary) !important;
    box-shadow: 0 0 0 3px rgba(212,168,83,0.1), 0 0 12px rgba(212,168,83,0.08);
    background: rgba(255,255,255,0.06) !important;
}
.bb-search::placeholder {
    color: rgba(255,255,255,0.25);
}

.bb-select {
    padding: 9px 14px !important;
    border-radius: 8px !important;
    font-size: 0.82rem !important;
}

/* ── Table Enhancement ── */
.bb-table-wrap {
    border-radius: 10px !important;
    border: 1px solid rgba(255,255,255,0.08) !important;
    box-shadow: 0 2px 12px rgba(0,0,0,0.15);
}

.bb-table {
    font-size: 0.84rem !important;
}

.bb-table th {
    padding: 12px 12px !important;
    font-size: 0.7rem !important;
    letter-spacing: 0.1em !important;
    border-bottom: 2px solid rgba(212,168,83,0.15) !important;
    background: rgba(255,255,255,0.04) !important;
    color: rgba(255,255,255,0.5) !important;
}

.bb-table td {
    padding: 13px 12px !important;
    border-bottom: 1px solid rgba(255,255,255,0.04) !important;
}

/* Alternating rows more distinct */
.bb-row:nth-child(even) {
    background: rgba(255,255,255,0.025) !important;
}
.bb-row:nth-child(odd) {
    background: rgba(0,0,0,0.08) !important;
}

/* Row hover — gold left border accent */
.bb-row {
    transition: all 0.15s ease !important;
    border-left: 3px solid transparent;
}
.bb-row:hover {
    background: rgba(212,168,83,0.10) !important;
    border-left-color: var(--gold-primary) !important;
    box-shadow: inset 0 0 0 1px rgba(212,168,83,0.08);
}
.bb-row:nth-child(even):hover {
    background: rgba(212,168,83,0.11) !important;
    border-left-color: var(--gold-primary) !important;
    box-shadow: inset 0 0 0 1px rgba(212,168,83,0.08);
}

/* Row name */
.bb-td-name {
    font-size: 0.86rem;
    font-weight: 700 !important;
    letter-spacing: 0.01em;
}

/* Research bars wider/taller */
.bb-research-bar {
    width: 64px !important;
    height: 7px !important;
    border-radius: 4px !important;
    box-shadow: inset 0 1px 2px rgba(0,0,0,0.3) !important;
    background: rgba(255,255,255,0.08) !important;
}
.bb-research-fill {
    border-radius: 4px !important;
    box-shadow: 0 0 4px currentColor;
}
.bb-research-pct {
    font-size: 0.72rem !important;
    font-weight: 600;
}

/* Research status dot larger */
.bb-research-status-dot {
    width: 10px !important;
    height: 10px !important;
}

/* Stage badges more prominent */
.bb-stage-badge {
    font-size: 0.72rem !important;
    padding: 3px 10px !important;
    border-radius: 12px !important;
    letter-spacing: 0.02em;
    box-shadow: 0 1px 3px rgba(0,0,0,0.15);
}

/* Type pills */
.bb-type-pill {
    font-size: 0.7rem !important;
    padding: 3px 9px !important;
    border-radius: 12px !important;
}

/* Dim "No Contact" / "None" text */
.bb-td-comms:empty,
.bb-comms-days:empty {
    opacity: 0.3;
}
/* "No Contact" placeholder text — subtle italic */
.bb-td-comms,
.bb-td-stage {
    font-size: 0.75rem !important;
}
.bb-row .bb-td-comms {
    color: var(--text-muted) !important;
    font-style: italic;
    opacity: 0.7;
}
.bb-comms-status-badge[style*="background: rgba(75"],
.bb-comms-status-badge[style*="background: rgba(55"] {
    opacity: 0.5;
}

/* Next action buttons */
.bb-next-btn {
    padding: 4px 12px !important;
    border-radius: 6px !important;
    font-size: 0.72rem !important;
    transition: all 0.2s ease !important;
}
.bb-next-btn:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 3px 8px rgba(0,0,0,0.2);
}

/* ── Priority Rings — Larger & More Visible ── */
.bb-priority-ring {
    width: 36px !important;
    height: 36px !important;
    box-shadow: 0 0 6px rgba(212,168,83,0.15), inset 0 0 3px rgba(255,255,255,0.05) !important;
}
.bb-priority-ring::before {
    inset: 5px !important;
    background: var(--bg-card, #1a1a2e) !important;
}
.bb-priority-num {
    font-size: 0.72rem !important;
    font-weight: 800 !important;
    color: var(--text-secondary, #aaa) !important;
}
/* Zero-score rings get dimmer treatment */
.bb-priority-ring[style*="--pri-pct: 0%"] .bb-priority-num,
.bb-priority-ring[style*="--pri-pct:0%"] .bb-priority-num {
    color: var(--text-muted, #666) !important;
}
/* Non-zero rings glow */
.bb-priority-ring:not([style*="--pri-pct: 0%"]):not([style*="--pri-pct:0%"]) {
    box-shadow: 0 0 8px rgba(212,168,83,0.25), inset 0 0 3px rgba(255,255,255,0.05) !important;
}
.bb-td-priority {
    width: 56px !important;
}

/* ── Alert Banners (Game Plan rows) ── */
.bb-gp-row {
    padding: 12px 16px !important;
    border-radius: 10px !important;
    background: linear-gradient(135deg, var(--bg-elevated), rgba(255,255,255,0.03)) !important;
    border: 1px solid rgba(255,255,255,0.08) !important;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
    transition: all 0.2s ease !important;
}
.bb-gp-row:hover {
    background: linear-gradient(135deg, rgba(212,168,83,0.06), rgba(212,168,83,0.02)) !important;
    border-color: rgba(212,168,83,0.2) !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}
.bb-gp-row-count {
    font-size: 1.15rem !important;
    font-weight: 800 !important;
}
.bb-gp-row-desc {
    font-size: 0.82rem !important;
}
.bb-gp-row-action {
    font-size: 0.72rem !important;
    padding: 5px 12px !important;
    border-radius: 6px !important;
}

/* ── Bottom Action Bar — Fixed & Prominent ── */
.bb-quick-actions {
    position: sticky;
    bottom: 0;
    z-index: 10;
    padding: 12px 16px !important;
    background: rgba(20,20,45,0.95) !important;
    backdrop-filter: blur(12px);
    border-top: 1px solid rgba(212,168,83,0.15);
    border-radius: 10px;
    margin-top: 8px;
    box-shadow: 0 -4px 16px rgba(0,0,0,0.25);
    gap: 10px !important;
}

.bb-action-btn {
    padding: 9px 18px !important;
    border-radius: 8px !important;
    font-size: 0.82rem !important;
    font-weight: 500;
    letter-spacing: 0.02em;
    transition: all 0.2s ease !important;
    border: 1px solid rgba(255,255,255,0.1) !important;
}
.bb-action-btn:hover {
    border-color: var(--gold-primary) !important;
    color: var(--gold-primary) !important;
    background: rgba(212,168,83,0.1) !important;
    transform: translateY(-1px);
    box-shadow: 0 3px 8px rgba(0,0,0,0.15);
}
.bb-action-btn.bb-action-primary {
    background: rgba(212,168,83,0.12) !important;
    border-color: rgba(212,168,83,0.35) !important;
    font-weight: 600;
    box-shadow: 0 0 8px rgba(212,168,83,0.1);
}
.bb-action-btn.bb-action-primary:hover {
    background: rgba(212,168,83,0.2) !important;
    box-shadow: 0 0 12px rgba(212,168,83,0.15), 0 3px 8px rgba(0,0,0,0.15);
}

/* ── Batch Bar Enhancement ── */
.bb-batch-bar-fixed {
    border-radius: 14px !important;
    padding: 14px 24px !important;
    box-shadow: 0 8px 32px rgba(0,0,0,0.6), 0 0 16px rgba(212,168,83,0.12) !important;
}
.bb-batch-count {
    font-size: 0.88rem !important;
    font-weight: 700;
}
.bb-batch-btn {
    padding: 6px 14px !important;
    border-radius: 8px !important;
    font-size: 0.8rem !important;
}

/* ── Table Card Border ── */
.bb-table-wrap {
    overflow: hidden;
}

/* ── Funnel Refill Alert Enhancement ── */
.bb-funnel-refill {
    padding: 10px 16px !important;
    border-radius: 8px !important;
    background: linear-gradient(135deg, rgba(245,158,11,0.05), rgba(255,255,255,0.02)) !important;
    border: 1px dashed rgba(245,158,11,0.2) !important;
    font-size: 0.75rem !important;
    transition: all 0.2s ease;
}
.bb-funnel-refill:hover {
    background: linear-gradient(135deg, rgba(245,158,11,0.08), rgba(255,255,255,0.03)) !important;
    border-color: rgba(245,158,11,0.35) !important;
}

/* ── Top Prospects Enhancement ── */
.bb-gp-prospects {
    padding-top: 14px !important;
    gap: 14px !important;
}
.bb-gp-prospect {
    font-size: 0.78rem !important;
    padding: 3px 8px;
    background: rgba(212,168,83,0.05);
    border-radius: 6px;
    transition: all 0.15s ease;
}
.bb-gp-prospect:hover {
    background: rgba(212,168,83,0.1);
    text-decoration: none !important;
}
.bb-gp-prospect-score {
    font-size: 0.65rem !important;
    padding: 2px 6px !important;
    border-radius: 4px !important;
    background: rgba(255,255,255,0.07) !important;
}

/* ── Scan Progress Enhancement ── */
.bb-scan-progress {
    border-radius: 8px !important;
    padding: 10px 16px !important;
    border: 1px solid rgba(212,168,83,0.3) !important;
    box-shadow: 0 0 12px rgba(212,168,83,0.06);
}

/* ── Section Title Accent ── */
.bb-briefing-label {
    position: relative;
    padding-left: 12px !important;
}
.bb-briefing-label::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 14px;
    background: var(--gold-primary);
    border-radius: 2px;
}

/* ── Detail Panel Polish ── */
.bb-detail-panel {
    border-left: 1px solid rgba(212,168,83,0.15) !important;
    box-shadow: -6px 0 24px rgba(0,0,0,0.4), -1px 0 0 rgba(212,168,83,0.08) !important;
}
.bb-detail-panel-name {
    font-size: 1.1rem !important;
    font-weight: 800 !important;
}

/* ── Contact Dots Enhancement ── */
.bb-contact-dot {
    width: 9px !important;
    height: 9px !important;
    box-shadow: 0 0 4px currentColor;
}
.bb-comms-dot {
    width: 9px !important;
    height: 9px !important;
    box-shadow: 0 0 4px currentColor;
}

/* ── Enrollment / Users / Value Cells ── */
.bb-td-enroll, .bb-td-users {
    font-weight: 600 !important;
}
.bb-td-val {
    font-weight: 700 !important;
    font-size: 0.82rem !important;
}

/* ── Keyboard Help Box ── */
.bb-kb-help {
    border: 1px solid rgba(212,168,83,0.15) !important;
    box-shadow: 0 8px 28px rgba(0,0,0,0.5), 0 0 8px rgba(212,168,83,0.06) !important;
}

/* ── Map Header Polish ── */
.bb-map-title {
    font-size: 0.75rem !important;
    font-weight: 700 !important;
}

/* ── Collapsible Map ── */
.bb-map-toggle {
    cursor: pointer;
    user-select: none;
    padding: 6px 0;
    transition: opacity 0.15s ease;
}
.bb-map-toggle:hover {
    opacity: 0.85;
}
.bb-map-chevron {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-left: auto;
    transition: transform 0.2s ease;
}
.bb-map-collapsed .bb-map-grid,
.bb-map-collapsed .bb-map-legend {
    display: none !important;
}

/* ── Sorted Column Glow ── */
.bb-th-sorted {
    color: var(--gold-primary) !important;
    text-shadow: 0 0 8px rgba(212,168,83,0.3);
}

/* ── Tighter Vertical Spacing ── */
.bb-header { margin-bottom: 8px !important; }
.bb-type-chips { margin-bottom: 8px !important; }
.bb-pipeline { margin-bottom: 6px !important; }
.bb-metrics-row { margin-bottom: 6px !important; }
.bb-map-wrap { margin-bottom: 8px !important; }
.bb-briefing { margin-bottom: 8px !important; }
.bb-scan-bar { margin-bottom: 6px !important; }

/* ── Table Overflow — Horizontal Scroll ── */
.bb-table-wrap {
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch;
}
.bb-table {
    min-width: 1100px !important;
}

/* ── Header Title ── */
.bb-title {
    font-size: 1.4rem !important;
    font-weight: 700 !important;
    letter-spacing: 0.03em !important;
    text-shadow: 0 1px 4px rgba(0,0,0,0.3);
}

/* ═══════════════════════════════════════════════
   COMMS PIPELINE INTELLIGENCE
   ═══════════════════════════════════════════════ */

.comms-intel {
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.comms-intel-section {
    background: var(--bg-card, #1e1e3a);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 10px;
    padding: 14px 16px;
}

.comms-intel-title {
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-secondary);
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.comms-intel-badge {
    background: rgba(212,168,83,0.2);
    color: var(--gold-primary);
    font-size: 0.68rem;
    padding: 2px 8px;
    border-radius: 10px;
    font-weight: 600;
}

.comms-intel-stages {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.comms-intel-stage-card {
    background: rgba(255,255,255,0.03);
    border-radius: 6px;
    padding: 8px 14px;
    min-width: 80px;
}

.comms-intel-stage-count {
    font-size: 1.2rem;
    font-weight: 800;
    font-family: 'Space Grotesk', sans-serif;
    color: var(--text-primary);
}

.comms-intel-stage-label {
    font-size: 0.65rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.comms-intel-list {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.comms-intel-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 8px;
    border-radius: 6px;
    font-size: 0.8rem;
    transition: background 0.15s ease;
}
.comms-intel-row:hover {
    background: rgba(255,255,255,0.04);
}

.comms-intel-urgent {
    border-left: 3px solid #ef4444;
    background: rgba(239,68,68,0.05);
}
.comms-intel-warning {
    border-left: 3px solid #f59e0b;
    background: rgba(245,158,11,0.04);
}

.comms-intel-org {
    font-weight: 600;
    color: var(--text-primary);
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.comms-intel-contact {
    color: var(--text-muted);
    font-size: 0.72rem;
    flex-shrink: 0;
}

.comms-intel-days {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 0.7rem;
    color: var(--text-muted);
    flex-shrink: 0;
    min-width: 35px;
    text-align: right;
}

.comms-intel-channel {
    font-size: 1rem;
    flex-shrink: 0;
    width: 20px;
    text-align: center;
}

.comms-intel-desc {
    color: var(--text-secondary);
    font-size: 0.75rem;
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.comms-intel-time {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 0.65rem;
    color: var(--text-muted);
    flex-shrink: 0;
}

.comms-intel-more {
    font-size: 0.72rem;
    color: var(--gold-primary);
    padding: 4px 8px;
    cursor: pointer;
    opacity: 0.8;
}
.comms-intel-more:hover { opacity: 1; }

.comms-intel-track-header {
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--text-muted);
    padding: 14px 16px 4px;
    border-top: 1px solid rgba(255,255,255,0.06);
    margin-top: 4px;
}
.comms-intel-track-header:first-child { border-top: none; margin-top: 0; }
.comms-intel-badge-blue   { background: rgba(59,130,246,0.2);  color: #60a5fa; }
.comms-intel-badge-orange { background: rgba(249,115,22,0.2);  color: #fb923c; }
.comms-intel-empty {
    font-size: 0.78rem;
    color: var(--text-muted);
    padding: 6px 16px 8px;
    font-style: italic;
}
.comms-intel-action-btn {
    background: rgba(212,168,83,0.12);
    border: 1px solid rgba(212,168,83,0.3);
    color: var(--gold-primary);
    border-radius: 6px;
    padding: 6px 16px;
    font-size: 0.78rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s;
}
.comms-intel-action-btn:hover { background: rgba(212,168,83,0.22); }

/* Proposal cards */
.comms-intel-proposal-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 4px 12px 8px;
}
.comms-intel-proposal-card {
    background: rgba(59,130,246,0.06);
    border: 1px solid rgba(59,130,246,0.18);
    border-left: 3px solid rgba(59,130,246,0.5);
    border-radius: 6px;
    padding: 8px 12px;
    transition: background 0.15s;
}
.comms-intel-proposal-card:hover { background: rgba(59,130,246,0.10); }
.comms-intel-proposal-title {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 4px;
}
.comms-intel-proposal-meta {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
    font-size: 0.72rem;
    color: var(--text-muted);
}
.comms-intel-proposal-org  { color: #60a5fa; font-weight: 500; }
.comms-intel-proposal-dot  { opacity: 0.4; }
.comms-intel-proposal-to   { color: var(--text-secondary); }
.comms-intel-proposal-sends { color: #4ade80; font-weight: 500; }
.comms-intel-proposal-time {
    margin-left: auto;
    color: var(--text-muted);
    font-size: 0.68rem;
    white-space: nowrap;
}
.comms-intel-proposal-test {
    opacity: 0.5;
    border-left-color: rgba(107,114,128,0.4);
    background: rgba(107,114,128,0.03);
    border-color: rgba(107,114,128,0.12);
}
.comms-intel-test-tag {
    display: inline-block;
    font-size: 0.58rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    color: #9ca3af;
    background: rgba(107,114,128,0.15);
    border: 1px solid rgba(107,114,128,0.25);
    border-radius: 3px;
    padding: 1px 5px;
    vertical-align: middle;
    margin-left: 6px;
}

/* ═══════════════════════════════════════════════
   DOCKED ASSISTANT PANEL (Phase 2)
   ═══════════════════════════════════════════════ */

.assistant-float {
    display: none;
    flex-direction: column;
    position: fixed;
    right: 24px;
    bottom: 24px;
    width: 380px;
    height: 520px;
    background: var(--bg-card, #1a1a2e);
    border: 1px solid var(--border-subtle, #333);
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.5), 0 0 0 1px rgba(212,168,83,0.1);
    z-index: 9000;
    overflow: hidden;
    resize: both;
    min-width: 320px;
    min-height: 360px;
    max-width: 600px;
    max-height: 80vh;
}

.assistant-float-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px;
    border-bottom: 1px solid var(--border-subtle);
    cursor: grab;
    user-select: none;
}

.assistant-float-header:active { cursor: grabbing; }

.assistant-dock-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    border-bottom: 1px solid var(--border-subtle);
}

.assistant-dock-header-left {
    display: flex;
    align-items: center;
    gap: 8px;
}

.assistant-dock-header-left svg { opacity: 0.7; }

.assistant-dock-title {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 0.85rem;
    color: var(--text-primary);
    letter-spacing: 0.04em;
}

.assistant-dock-close {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1.2rem;
    cursor: pointer;
    padding: 2px 6px;
    border-radius: 4px;
}

.assistant-dock-close:hover { color: var(--text-primary); background: rgba(255,255,255,0.05); }

/* Mode tabs */
.assistant-mode-tabs {
    display: flex;
    border-bottom: 1px solid var(--border-subtle);
    padding: 0 8px;
}

.assistant-mode-tab {
    flex: 1;
    padding: 8px 4px;
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    color: var(--text-muted);
    font-family: inherit;
    font-size: 0.75rem;
    cursor: pointer;
    text-align: center;
    transition: all 0.15s ease;
}

.assistant-mode-tab:hover { color: var(--text-secondary); }

.assistant-mode-tab.active {
    color: var(--gold-primary);
    border-bottom-color: var(--gold-primary);
}

/* Mode content area */
.assistant-mode-content {
    flex: 1;
    overflow-y: auto;
    min-height: 0;
}

.assistant-chat-mode {
    display: flex;
    flex-direction: column;
    height: 100%;
}

/* Reuse existing assistant-chat, assistant-chips, assistant-input styles */

/* ── Mode View Styles ── */
.amode-section { padding: 16px; }
.amode-heading {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 0.85rem;
    color: var(--gold-primary);
    margin-bottom: 12px;
    letter-spacing: 0.04em;
}
.amode-subheading {
    font-size: 0.78rem;
    color: var(--text-secondary);
    margin: 12px 0 8px;
}
.amode-subsection { margin-top: 8px; }
.amode-date {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-bottom: 12px;
}
.amode-desc {
    font-size: 0.78rem;
    color: var(--text-muted);
    margin-bottom: 12px;
}

.amode-stat-row {
    display: flex;
    gap: 10px;
    margin-bottom: 14px;
}

.amode-stat {
    flex: 1;
    text-align: center;
    padding: 10px;
    background: var(--bg-elevated);
    border-radius: 8px;
    border: 1px solid var(--border-subtle);
}

.amode-stat-num {
    display: block;
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--gold-primary);
}

.amode-stat-lbl {
    font-size: 0.65rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.amode-item {
    padding: 6px 0;
    font-size: 0.8rem;
    color: var(--text-secondary);
    border-bottom: 1px solid rgba(255,255,255,0.03);
}

.amode-item strong { color: var(--text-primary); }

.amode-alert { color: #f59e0b; }

.amode-icon { margin-right: 4px; }

.amode-empty {
    text-align: center;
    padding: 2rem;
    color: var(--text-muted);
    font-size: 0.82rem;
}

.amode-loading {
    text-align: center;
    padding: 1rem;
    color: var(--gold-primary);
    font-size: 0.82rem;
}

/* Reach bar */
.amode-reach {
    margin: 10px 0;
}

.amode-reach-bar {
    height: 6px;
    background: rgba(255,255,255,0.06);
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 4px;
}

.amode-reach-fill {
    height: 100%;
    background: #22c55e;
    border-radius: 3px;
    transition: width 0.3s ease;
}

.amode-reach-label {
    font-size: 0.7rem;
    color: var(--text-muted);
}

/* Stage grid */
.amode-stage-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4px;
    margin: 8px 0;
}

.amode-stage-item {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 4px 8px;
    font-size: 0.75rem;
    background: rgba(255,255,255,0.02);
    border-radius: 4px;
}

.amode-stage-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    flex-shrink: 0;
}

.amode-stage-label { color: var(--text-secondary); flex: 1; }
.amode-stage-count { color: var(--text-primary); font-family: 'Space Grotesk', sans-serif; font-size: 0.72rem; }

/* Events */
.amode-event {
    padding: 5px 0;
    font-size: 0.75rem;
    color: var(--text-secondary);
    border-bottom: 1px solid rgba(255,255,255,0.03);
}

.amode-event-type {
    display: inline-block;
    background: rgba(212,168,83,0.1);
    color: var(--gold-primary);
    padding: 1px 6px;
    border-radius: 8px;
    font-size: 0.65rem;
    font-family: 'Space Grotesk', sans-serif;
    text-transform: uppercase;
    margin-right: 4px;
}

.amode-event-time {
    float: right;
    color: var(--text-muted);
    font-size: 0.68rem;
}

/* Actions */
.amode-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 8px;
}

.amode-action-btn {
    padding: 6px 12px;
    background: var(--bg-elevated);
    border: 1px solid var(--border-subtle);
    border-radius: 6px;
    color: var(--text-secondary);
    font-family: inherit;
    font-size: 0.75rem;
    cursor: pointer;
    transition: all 0.15s ease;
}

.amode-action-btn:hover {
    border-color: var(--gold-primary);
    color: var(--gold-primary);
}

/* Draft controls */
.amode-draft-controls {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 12px;
}

.amode-select {
    padding: 7px 10px;
    background: var(--bg-input);
    border: 1px solid var(--border-subtle);
    border-radius: 6px;
    color: var(--text-primary);
    font-family: inherit;
    font-size: 0.8rem;
}

.amode-select:focus { border-color: var(--gold-primary); outline: none; }

.amode-draft-btn {
    align-self: flex-start;
}

.amode-draft-output {
    padding: 8px 0;
    font-size: 0.82rem;
    color: var(--text-secondary);
}

/* ═══════════════════════════════════════════════
   DISCOVERY PANEL (Phase 2)
   ═══════════════════════════════════════════════ */

.fullscreen-panel {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.8);
    z-index: 9000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.fullscreen-panel-inner {
    width: 90%;
    max-width: 900px;
    max-height: 85vh;
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.discovery-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px 16px;
    border-bottom: 1px solid rgba(212,168,83,0.1);
}
.discovery-header-left {
    display: flex;
    align-items: center;
    gap: 14px;
}
.discovery-logo {
    width: 44px; height: 44px;
    background: linear-gradient(135deg, rgba(212,168,83,0.2), rgba(212,168,83,0.06));
    border: 1px solid rgba(212,168,83,0.25);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.discovery-title {
    font-family: 'Cinzel', serif;
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: 0.04em;
    margin: 0;
}
.discovery-subtitle {
    font-size: 0.72rem;
    color: var(--text-muted);
    margin-top: 2px;
}
.discovery-close {
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.06);
    color: var(--text-muted);
    font-size: 1.2rem;
    cursor: pointer;
    padding: 6px 10px;
    border-radius: 8px;
    transition: all 0.15s;
}
.discovery-close:hover { color: var(--text-primary); background: rgba(255,255,255,0.08); border-color: rgba(255,255,255,0.1); }

.discovery-search-bar {
    display: flex;
    gap: 10px;
    padding: 16px 24px;
}
.discovery-search {
    flex: 1;
    padding: 12px 18px;
    background: rgba(0,0,0,0.35);
    border: 1px solid rgba(212,168,83,0.15);
    border-radius: 12px;
    color: var(--text-primary);
    font-family: inherit;
    font-size: 0.88rem;
    outline: none;
    transition: border-color 0.25s, box-shadow 0.25s;
}
.discovery-search::placeholder { color: rgba(255,255,255,0.22); }
.discovery-search:focus {
    border-color: rgba(212,168,83,0.4);
    box-shadow: 0 0 0 3px rgba(212,168,83,0.08);
}
.discovery-go {
    padding: 12px 28px;
    background: linear-gradient(135deg, var(--gold-primary), #e5be6a);
    color: #0a0a14;
    border: none;
    border-radius: 12px;
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 700;
    font-size: 0.88rem;
    cursor: pointer;
    transition: all 0.2s;
    letter-spacing: 0.02em;
    box-shadow: 0 2px 12px rgba(212,168,83,0.2);
}
.discovery-go:hover { box-shadow: 0 4px 20px rgba(212,168,83,0.3); transform: translateY(-1px); }

/* Discovery pipeline */
.disc-pipeline-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 16px 20px;
}

.disc-pipeline-card {
    text-align: center;
    padding: 10px 16px;
    background: var(--bg-elevated);
    border: 1px solid;
    border-radius: 8px;
    min-width: 80px;
}

.disc-pipeline-num {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.4rem;
    font-weight: 700;
}

.disc-pipeline-label {
    font-size: 0.68rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.disc-pipeline-arrow {
    color: var(--text-muted);
    font-size: 1.2rem;
    opacity: 0.4;
}

/* Discovery results */
.discovery-results {
    flex: 1;
    overflow-y: auto;
    padding: 12px 20px;
}

.disc-intent {
    font-size: 0.82rem;
    color: var(--text-secondary);
    padding: 8px 12px;
    background: rgba(212,168,83,0.06);
    border-radius: 6px;
    margin-bottom: 12px;
}

.disc-results-count {
    font-size: 0.78rem;
    color: var(--text-muted);
    margin-bottom: 8px;
}

.disc-results-table {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.disc-result-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 10px;
    background: rgba(255,255,255,0.01);
    border-radius: 4px;
    font-size: 0.82rem;
    transition: background 0.1s;
}

.disc-result-row:hover { background: rgba(212,168,83,0.06); }

.disc-result-num { color: var(--text-muted); font-family: 'Space Grotesk', sans-serif; font-size: 0.72rem; width: 24px; }
.disc-result-name { flex: 1; color: var(--text-primary); font-weight: 600; }
.disc-result-type { color: var(--text-muted); font-size: 0.75rem; width: 80px; }
.disc-result-state { font-family: 'Space Grotesk', sans-serif; font-size: 0.75rem; width: 30px; text-align: center; }
.disc-result-val { font-family: 'Space Grotesk', sans-serif; color: var(--gold-primary); font-size: 0.75rem; width: 50px; text-align: right; }

.disc-empty {
    text-align: center;
    padding: 2rem;
    color: var(--text-muted);
    font-size: 0.85rem;
}

/* Discovery actions */
.discovery-actions { padding: 12px 20px; border-top: 1px solid var(--border-subtle); }

.disc-action-row {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.disc-action-btn {
    padding: 8px 14px;
    background: var(--bg-elevated);
    border: 1px solid var(--border-subtle);
    border-radius: 6px;
    color: var(--text-secondary);
    font-family: inherit;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.15s ease;
}

.disc-action-btn:hover {
    border-color: var(--gold-primary);
    color: var(--gold-primary);
}

.disc-action-primary {
    background: linear-gradient(135deg, var(--gold-primary), #e5be6a);
    color: #0a0a14;
    border-color: transparent;
    font-weight: 700;
    letter-spacing: 0.02em;
    box-shadow: 0 2px 12px rgba(212,168,83,0.25);
}
.disc-action-primary:hover {
    background: linear-gradient(135deg, #e5be6a, var(--gold-primary));
    color: #0a0a14;
    border-color: transparent;
    box-shadow: 0 4px 20px rgba(212,168,83,0.35);
    transform: translateY(-1px);
}

/* ── Targeted Lookup ── */

.disc-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    padding: 3rem 2rem;
    color: var(--text-muted);
    font-size: 0.85rem;
}
.disc-spinner {
    width: 32px; height: 32px;
    border: 2px solid rgba(212,168,83,0.15);
    border-top-color: var(--gold-primary);
    border-radius: 50%;
    animation: disc-spin 0.7s cubic-bezier(0.4, 0, 0.2, 1) infinite;
}
@keyframes disc-spin { to { transform: rotate(360deg); } }

/* Result card */
.disc-target-card {
    position: relative;
    background: linear-gradient(145deg, rgba(30,30,45,0.8), rgba(20,20,35,0.9));
    border: 1px solid rgba(212,168,83,0.15);
    border-radius: 14px;
    padding: 0;
    margin: 16px 0;
    overflow: hidden;
    box-shadow: 0 4px 24px rgba(0,0,0,0.3), inset 0 1px 0 rgba(255,255,255,0.04);
}
.disc-target-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--gold-primary), #e5be6a, var(--gold-primary));
    opacity: 0.8;
}

/* Header section */
.disc-target-header {
    padding: 24px 24px 16px;
    display: flex;
    align-items: flex-start;
    gap: 16px;
}
.disc-target-avatar {
    width: 52px; height: 52px;
    border-radius: 12px;
    background: linear-gradient(135deg, rgba(212,168,83,0.15), rgba(212,168,83,0.05));
    border: 1px solid rgba(212,168,83,0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    color: var(--gold-primary);
    flex-shrink: 0;
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 700;
}
.disc-target-identity { flex: 1; min-width: 0; }
.disc-target-name {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text-primary);
    font-family: 'Space Grotesk', sans-serif;
    line-height: 1.25;
    margin: 0;
}
.disc-target-title {
    font-size: 0.82rem;
    color: var(--gold-primary);
    margin: 3px 0 0;
    font-weight: 500;
}
.disc-target-org {
    font-size: 0.78rem;
    color: var(--text-muted);
    margin: 2px 0 0;
}

/* Tags row */
.disc-target-details {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    padding: 0 24px 16px;
}
.disc-tag {
    padding: 3px 10px;
    background: rgba(212,168,83,0.08);
    border: 1px solid rgba(212,168,83,0.18);
    border-radius: 6px;
    font-size: 0.68rem;
    color: var(--gold-primary);
    font-family: 'Space Grotesk', sans-serif;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-weight: 600;
}
.disc-tag--blue {
    background: rgba(96,165,250,0.08);
    border-color: rgba(96,165,250,0.18);
    color: #60a5fa;
}
.disc-tag--green {
    background: rgba(34,197,94,0.08);
    border-color: rgba(34,197,94,0.18);
    color: #22c55e;
}

/* Info grid */
.disc-target-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1px;
    background: rgba(255,255,255,0.03);
    border-top: 1px solid rgba(255,255,255,0.04);
    border-bottom: 1px solid rgba(255,255,255,0.04);
}
.disc-target-cell {
    padding: 12px 24px;
    background: rgba(20,20,35,0.6);
}
.disc-target-cell--full { grid-column: 1 / -1; }
.disc-target-cell-label {
    font-size: 0.65rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-weight: 600;
    margin-bottom: 3px;
    font-family: 'Space Grotesk', sans-serif;
}
.disc-target-cell-value {
    font-size: 0.8rem;
    color: var(--text-secondary);
    line-height: 1.45;
    word-break: break-word;
}
.disc-target-cell-value a {
    color: var(--gold-primary);
    text-decoration: none;
}
.disc-target-cell-value a:hover { text-decoration: underline; }

/* Sections (fallback for non-grid fields) */
.disc-target-section {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin: 0;
    padding: 10px 24px;
    line-height: 1.5;
    border-top: 1px solid rgba(255,255,255,0.03);
}
.disc-target-section strong {
    color: var(--text-muted);
    font-size: 0.68rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-family: 'Space Grotesk', sans-serif;
}

/* Staff list */
.disc-staff-section {
    padding: 16px 24px 20px;
    border-top: 1px solid rgba(255,255,255,0.04);
}
.disc-staff-heading {
    font-size: 0.68rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-weight: 600;
    font-family: 'Space Grotesk', sans-serif;
    margin-bottom: 10px;
}
.disc-staff-list { margin: 0; }
.disc-staff-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 12px;
    margin: 0 -12px;
    font-size: 0.78rem;
    border-radius: 8px;
    transition: background 0.15s;
}
.disc-staff-row:hover { background: rgba(212,168,83,0.04); }
.disc-staff-avatar {
    width: 28px; height: 28px;
    border-radius: 7px;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.06);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.65rem;
    color: var(--text-muted);
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 600;
    flex-shrink: 0;
}
.disc-staff-info { flex: 1; min-width: 0; }
.disc-staff-name {
    color: var(--text-primary);
    font-weight: 600;
    font-size: 0.78rem;
}
.disc-staff-title {
    color: var(--text-muted);
    font-size: 0.7rem;
    margin-top: 1px;
}
.disc-staff-email {
    color: var(--gold-primary);
    font-family: 'Space Grotesk', sans-serif;
    font-size: 0.7rem;
    flex-shrink: 0;
}

/* Action bar */
.disc-action-row {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}
.disc-action-btn {
    padding: 10px 18px;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 8px;
    color: var(--text-secondary);
    font-family: inherit;
    font-size: 0.8rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}
.disc-action-btn:hover {
    border-color: var(--gold-primary);
    color: var(--gold-primary);
    background: rgba(212,168,83,0.06);
}

/* ===== BenOS Agent Toggle ===== */
.benos-toggle-container {
    position: fixed;
    top: 12px;
    right: 16px;
    z-index: 10000;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    background: rgba(20, 20, 30, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(212, 175, 55, 0.25);
    border-radius: 20px;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.25s ease;
    user-select: none;
}
.benos-toggle-container:hover {
    border-color: rgba(212, 175, 55, 0.5);
    box-shadow: 0 2px 12px rgba(212, 175, 55, 0.15);
}
.benos-toggle-container.active {
    border-color: var(--gold-primary);
    box-shadow: 0 2px 16px rgba(212, 175, 55, 0.25);
}
.benos-toggle-label {
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    color: var(--text-muted);
    transition: color 0.25s ease;
}
.benos-toggle-container.active .benos-toggle-label {
    color: var(--gold-primary);
}
.benos-toggle-switch {
    position: relative;
    width: 32px;
    height: 18px;
    background: var(--bg-subtle);
    border-radius: 9px;
    transition: background 0.25s ease;
}
.benos-toggle-container.active .benos-toggle-switch {
    background: var(--gold-primary);
}
.benos-toggle-switch::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 14px;
    height: 14px;
    background: #fff;
    border-radius: 50%;
    transition: transform 0.25s ease;
}
.benos-toggle-container.active .benos-toggle-switch::after {
    transform: translateX(14px);
}
.benos-notification {
    position: fixed;
    top: 52px;
    right: 16px;
    z-index: 10001;
    padding: 8px 16px;
    background: rgba(20, 20, 30, 0.9);
    border: 1px solid var(--gold-primary);
    border-radius: 8px;
    color: var(--gold-primary);
    font-size: 0.75rem;
    font-weight: 500;
    opacity: 0;
    transform: translateY(-8px);
    transition: all 0.3s ease;
    pointer-events: none;
}
.benos-notification.show {
    opacity: 1;
    transform: translateY(0);
}

/* BenOS Feedback Bar */
.benos-fb-bar {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.35rem 0.75rem;
    margin-top: 0.5rem;
    background: var(--bg-secondary, #1a1a2e);
    border: 1px solid var(--border-color, #2a2a4a);
    border-radius: 6px;
    font-size: 0.75rem;
    color: var(--text-muted, #888);
}
.benos-fb-bar .benos-fb-label {
    font-weight: 600;
    color: #ff6b35;
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.benos-fb-bar button {
    background: none;
    border: 1px solid var(--border-color, #2a2a4a);
    border-radius: 4px;
    padding: 0.15rem 0.4rem;
    cursor: pointer;
    font-size: 0.8rem;
    transition: background 0.2s, border-color 0.2s;
}
.benos-fb-bar button:hover {
    background: rgba(255, 107, 53, 0.1);
    border-color: #ff6b35;
}
.benos-fb-bar .benos-fb-score {
    margin-left: auto;
    font-weight: 700;
    padding: 0.1rem 0.5rem;
    border-radius: 4px;
    font-size: 0.7rem;
}
.benos-fb-score.grade-a { background: rgba(16, 185, 129, 0.15); color: #10b981; }
.benos-fb-score.grade-b { background: rgba(59, 130, 246, 0.15); color: #3b82f6; }
.benos-fb-score.grade-c { background: rgba(245, 158, 11, 0.15); color: #f59e0b; }
.benos-fb-score.grade-d { background: rgba(239, 68, 68, 0.15); color: #ef4444; }
.benos-fb-form {
    margin-top: 0.5rem;
    padding: 0.5rem;
    background: var(--bg-secondary, #1a1a2e);
    border: 1px solid var(--border-color, #2a2a4a);
    border-radius: 6px;
}
.benos-fb-form textarea {
    width: 100%;
    min-height: 60px;
    background: var(--bg-primary, #0d0d1a);
    border: 1px solid var(--border-color, #2a2a4a);
    border-radius: 4px;
    color: var(--text-primary, #e0e0e0);
    padding: 0.4rem;
    font-size: 0.8rem;
    resize: vertical;
    margin-bottom: 0.4rem;
}
.benos-fb-form button {
    background: #ff6b35;
    color: white;
    border: none;
    border-radius: 4px;
    padding: 0.3rem 0.8rem;
    font-size: 0.75rem;
    cursor: pointer;
    font-weight: 600;
}
.benos-fb-form button:hover {
    background: #e55a2b;
}

/* ═══════════════════════════════════════════════════════════════
   CALENDAR & MEETINGS
   ═══════════════════════════════════════════════════════════════ */

#calendarModal.modal-overlay {
    position: fixed;
    z-index: 9500;
}
#calendarModal > .modal-content {
    background: var(--bg-primary, #0a0a0f);
    width: 100%;
    height: 100%;
    max-width: 100%;
    max-height: 100%;
    border-radius: 0;
}

.cal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--border-subtle);
    background: linear-gradient(135deg, rgba(59,130,246,0.08), transparent);
}

.cal-view-toggle {
    display: flex;
    background: var(--bg-input);
    border-radius: 8px;
    padding: 2px;
    gap: 2px;
}
.cal-view-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    padding: 0.35rem 0.85rem;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s;
}
.cal-view-btn.active {
    background: var(--bg-elevated);
    color: var(--gold-primary);
}
.cal-view-btn:hover:not(.active) {
    color: var(--text-secondary);
}

/* Sidebar */
.cal-sidebar {
    width: 240px;
    min-width: 240px;
    border-right: 1px solid var(--border-subtle);
    padding: 1rem;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}
.cal-sidebar-section {
    border-top: 1px solid rgba(255,255,255,0.05);
    padding-top: 0.75rem;
}
.cal-sidebar-title {
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
    font-weight: 700;
}
.cal-sidebar-btn {
    width: 100%;
    background: none;
    border: 1px dashed var(--border-subtle);
    color: var(--text-muted);
    padding: 0.4rem;
    border-radius: 6px;
    font-size: 0.75rem;
    cursor: pointer;
    transition: all 0.15s;
    margin-top: 0.5rem;
}
.cal-sidebar-btn:hover {
    border-color: var(--gold-primary);
    color: var(--gold-primary);
}

/* Upcoming items */
.cal-upcoming-item {
    display: flex;
    gap: 0.5rem;
    padding: 0.4rem 0.5rem;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.15s;
}
.cal-upcoming-item:hover { background: var(--bg-elevated); }
.cal-upcoming-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; margin-top: 4px; }
.cal-upcoming-details { flex: 1; min-width: 0; }
.cal-upcoming-title { font-size: 0.8rem; color: var(--text-primary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cal-upcoming-meta { font-size: 0.7rem; color: var(--text-muted); }
.cal-upcoming-org { font-size: 0.65rem; color: var(--text-muted); }

/* Filter buttons */
.cal-filter-btn {
    display: block;
    width: 100%;
    background: none;
    border: none;
    border-left: 3px solid transparent;
    color: var(--text-muted);
    padding: 0.3rem 0.5rem;
    font-size: 0.75rem;
    cursor: pointer;
    text-align: left;
    transition: all 0.15s;
}
.cal-filter-btn:hover { color: var(--text-secondary); background: rgba(255,255,255,0.03); }
.cal-filter-btn.active { color: var(--text-primary); background: rgba(255,255,255,0.05); border-left-color: var(--gold-primary); }

/* Main area */
.cal-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}
.cal-nav {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.25rem;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}
.cal-nav-btn {
    background: var(--bg-elevated);
    border: 1px solid var(--border-subtle);
    color: var(--text-secondary);
    width: 32px;
    height: 32px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s;
}
.cal-nav-btn:hover { border-color: var(--gold-primary); color: var(--gold-primary); }
.cal-today-btn { width: auto; padding: 0 0.75rem; font-size: 0.75rem; font-weight: 600; }
.cal-nav-label { font-family: 'Cinzel', serif; font-size: 1.1rem; color: var(--text-primary); margin: 0 0.5rem; }

.cal-grid-container {
    flex: 1;
    overflow-y: auto;
    padding: 0.75rem 1.25rem;
}

/* ── Month Grid ── */
.cal-month-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 1px;
    background: rgba(255,255,255,0.03);
    border-radius: 8px;
    overflow: hidden;
}
.cal-day-header {
    padding: 0.5rem;
    text-align: center;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-muted);
    background: var(--bg-card);
}
.cal-day-cell {
    min-height: 90px;
    padding: 0.4rem;
    background: var(--bg-card);
    cursor: pointer;
    transition: background 0.15s;
    display: flex;
    flex-direction: column;
}
.cal-day-cell:hover { background: var(--bg-elevated); }
.cal-day-cell.cal-day-empty { background: var(--bg-deep); cursor: default; }
.cal-day-cell.cal-day-empty:hover { background: var(--bg-deep); }
.cal-day-cell.cal-today { background: rgba(59,130,246,0.05); }
.cal-day-cell.cal-selected { background: rgba(212,168,83,0.08); outline: 1px solid var(--gold-primary); outline-offset: -1px; }
.cal-day-num { font-size: 0.8rem; font-weight: 600; color: var(--text-secondary); margin-bottom: 0.25rem; }
.cal-today-num { color: #3b82f6; }

.cal-event-pill {
    padding: 0.15rem 0.4rem;
    border-radius: 4px;
    font-size: 0.65rem;
    font-weight: 600;
    margin-bottom: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    cursor: pointer;
    transition: opacity 0.15s;
}
.cal-event-pill:hover { opacity: 0.8; }
.cal-event-more { font-size: 0.6rem; color: var(--text-muted); padding-left: 0.4rem; }

/* ── Week Grid ── */
.cal-week-grid {
    display: grid;
    grid-template-columns: 60px repeat(7, 1fr);
    gap: 1px;
    background: rgba(255,255,255,0.03);
    border-radius: 8px;
    overflow: hidden;
}
.cal-week-time-header { background: var(--bg-card); }
.cal-week-day-header {
    padding: 0.5rem;
    text-align: center;
    background: var(--bg-card);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.15rem;
}
.cal-week-day-header.cal-today { background: rgba(59,130,246,0.05); }
.cal-week-day-name { font-size: 0.65rem; text-transform: uppercase; color: var(--text-muted); font-weight: 700; }
.cal-week-day-num { font-size: 1rem; font-weight: 700; color: var(--text-secondary); }
.cal-week-day-num.cal-today-num { color: #3b82f6; }
.cal-week-time-label {
    padding: 0.4rem 0.5rem;
    font-size: 0.65rem;
    color: var(--text-muted);
    text-align: right;
    background: var(--bg-card);
    white-space: nowrap;
}
.cal-week-cell {
    min-height: 50px;
    background: var(--bg-card);
    padding: 2px;
    cursor: pointer;
    transition: background 0.15s;
}
.cal-week-cell:hover { background: var(--bg-elevated); }
.cal-week-event {
    padding: 0.2rem 0.4rem;
    border-radius: 4px;
    margin-bottom: 2px;
    cursor: pointer;
}
.cal-week-event:hover { opacity: 0.85; }

/* ── Agenda ── */
.cal-agenda-list { display: flex; flex-direction: column; gap: 2px; }
.cal-agenda-day-header {
    padding: 0.6rem 0.75rem;
    font-family: 'Cinzel', serif;
    font-size: 0.85rem;
    color: var(--text-muted);
    background: var(--bg-card);
    border-radius: 6px;
    margin-top: 0.5rem;
}
.cal-agenda-day-header.cal-today { color: #3b82f6; background: rgba(59,130,246,0.05); }
.cal-agenda-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    background: var(--bg-card);
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.15s;
}
.cal-agenda-item:hover { background: var(--bg-elevated); }
.cal-agenda-time { font-size: 0.8rem; color: var(--text-muted); min-width: 100px; font-weight: 600; }
.cal-agenda-dot { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }
.cal-agenda-details { flex: 1; min-width: 0; }
.cal-agenda-title { font-size: 0.9rem; font-weight: 600; color: var(--text-primary); }
.cal-agenda-meta { display: flex; gap: 0.75rem; font-size: 0.75rem; color: var(--text-muted); margin-top: 0.15rem; }
.cal-agenda-status { font-size: 0.7rem; font-weight: 600; white-space: nowrap; }

/* ── Mini Calendar ── */
.cal-mini { padding: 0.25rem; }
.cal-mini-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.5rem;
}
.cal-mini-label { font-size: 0.8rem; font-weight: 700; color: var(--text-secondary); }
.cal-mini-nav {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 1rem;
    padding: 0.15rem 0.5rem;
    border-radius: 4px;
}
.cal-mini-nav:hover { color: var(--gold-primary); }
.cal-mini-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 1px;
    text-align: center;
}
.cal-mini-day-header { font-size: 0.55rem; color: var(--text-muted); padding: 0.2rem; font-weight: 700; }
.cal-mini-cell {
    font-size: 0.7rem;
    padding: 0.25rem;
    border-radius: 4px;
    cursor: pointer;
    color: var(--text-secondary);
    transition: background 0.15s;
}
.cal-mini-cell:hover { background: var(--bg-elevated); }
.cal-mini-today { color: #3b82f6; font-weight: 700; }
.cal-mini-has-event { position: relative; }
.cal-mini-has-event::after {
    content: '';
    position: absolute;
    bottom: 2px;
    left: 50%;
    transform: translateX(-50%);
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: var(--gold-primary);
}

/* ── Footer ── */
.cal-footer {
    display: flex;
    gap: 0.75rem;
    justify-content: flex-end;
    padding: 0.75rem 1.5rem;
    border-top: 1px solid var(--border-subtle);
}

/* ── Event Dialog ── */
.cal-dialog-overlay {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.6);
    z-index: 50;
    display: flex;
    align-items: center;
    justify-content: center;
}
.cal-dialog {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: 12px;
    max-height: 85vh;
    overflow-y: auto;
    min-width: 400px;
    max-width: 700px;
    width: 90%;
    box-shadow: 0 20px 60px rgba(0,0,0,0.5);
}

/* ── Form styles ── */
.cal-form-group { margin-bottom: 0.85rem; }
.cal-form-label { display: block; font-size: 0.7rem; font-weight: 700; color: var(--text-muted); margin-bottom: 0.3rem; text-transform: uppercase; letter-spacing: 0.05em; }
.cal-form-input {
    width: 100%;
    background: var(--bg-input);
    border: 1px solid var(--border-subtle);
    color: var(--text-primary);
    padding: 0.55rem 0.75rem;
    border-radius: 6px;
    font-size: 0.85rem;
    font-family: inherit;
    transition: border-color 0.15s;
}
.cal-form-input:focus { outline: none; border-color: var(--gold-primary); }
.cal-form-row { display: flex; gap: 0.75rem; }

/* ── Detail view ── */
.cal-detail-grid { display: flex; flex-direction: column; gap: 0.4rem; }
.cal-detail-row { display: flex; align-items: center; gap: 0.75rem; padding: 0.35rem 0; border-bottom: 1px solid rgba(255,255,255,0.03); }
.cal-detail-label { font-size: 0.7rem; font-weight: 700; color: var(--text-muted); min-width: 90px; text-transform: uppercase; letter-spacing: 0.05em; }
.cal-detail-value { font-size: 0.85rem; color: var(--text-primary); }

/* ── Conflict warning ── */
.cal-conflict-warning {
    padding: 0.75rem;
    background: var(--warning-bg);
    border: 1px solid rgba(251,191,36,0.3);
    border-radius: 8px;
    font-size: 0.8rem;
    color: var(--warning);
    margin-top: 0.5rem;
}

/* ── Empty state ── */
.cal-empty-state { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 3rem; }

/* Misc helpers */
.cal-link-btn {
    background: none;
    border: none;
    color: var(--gold-primary);
    font-size: 0.75rem;
    cursor: pointer;
    padding: 0;
    text-decoration: underline;
}
.cal-link-btn:hover { opacity: 0.8; }

.cal-prep-content { font-size: 0.85rem; color: var(--text-secondary); line-height: 1.6; }

.cal-spinner {
    width: 32px;
    height: 32px;
    border: 3px solid var(--border-subtle);
    border-top-color: var(--gold-primary);
    border-radius: 50%;
    animation: calSpin 0.8s linear infinite;
    margin: 0 auto;
}
@keyframes calSpin { to { transform: rotate(360deg); } }

/* ════════════════════════════════════════════════════════════════
   BenOS Settings Panel
   ════════════════════════════════════════════════════════════════ */

/* Calibration rule cards */
.benos-rule-card {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: 8px;
    margin-bottom: 0.5rem;
    transition: border-color 0.15s;
}
.benos-rule-card:hover { border-color: rgba(212,168,83,0.4); }

/* Source badges */
.rule-source {
    display: inline-block;
    font-size: 0.6rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 0.1rem 0.5rem;
    border-radius: 10px;
}
.rule-source.manual { background: rgba(212,168,83,0.15); color: #D4A853; }
.rule-source.auto   { background: rgba(34,197,94,0.15);  color: #22c55e; }
.rule-source.feedback { background: rgba(59,130,246,0.15); color: #3b82f6; }

/* Block header (personality tab) */
.benos-block-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.35rem;
}

/* Tab pane active state */
.benos-tab-pane.active { display: block !important; }

/* Workshop thinking dots animation */
.benos-thinking-dots {
    display: inline-block;
    animation: benosDots 1.4s infinite steps(4);
    width: 1.5em;
    text-align: left;
}
@keyframes benosDots {
    0%   { content: ''; }
    25%  { content: '.'; }
    50%  { content: '..'; }
    75%  { content: '...'; }
}

/* ===== CONTACTS VIEW (People-First Main View) ===== */
.cv-container {
    display: none;
    flex-direction: column;
    height: 100%;
    overflow-y: auto;
    padding: 1.5rem;
    gap: 1rem;
    position: relative;
}

.cv-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
}
.cv-header-left {
    display: flex;
    align-items: baseline;
    gap: 12px;
}
.cv-header-right {
    display: flex;
    align-items: center;
    gap: 10px;
}
.cv-title {
    font-family: 'Space Grotesk', 'Inter', sans-serif;
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--gold-primary);
    letter-spacing: 0.02em;
}
.cv-count {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-family: 'Space Grotesk', sans-serif;
}

/* Search */
.cv-search-wrap {
    position: relative;
    display: flex;
    align-items: center;
}
.cv-search-icon {
    position: absolute;
    left: 10px;
    width: 14px;
    height: 14px;
    color: var(--text-muted);
    pointer-events: none;
}
.cv-search-input {
    background: var(--bg-input);
    border: 1px solid var(--border-subtle);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 0.8rem;
    padding: 7px 12px 7px 30px;
    width: 220px;
    outline: none;
    transition: border-color 0.15s;
}
.cv-search-input:focus {
    border-color: var(--gold-primary);
}

/* Buttons */
.cv-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    border: none;
    border-radius: 8px;
    font-size: 0.78rem;
    font-weight: 500;
    padding: 7px 14px;
    cursor: pointer;
    transition: all 0.15s;
    font-family: inherit;
}
.cv-btn svg { width: 14px; height: 14px; }
.cv-btn-primary {
    background: linear-gradient(135deg, var(--gold-primary), var(--gold-dark));
    color: #1a1a2e;
}
.cv-btn-primary:hover { opacity: 0.9; }
.cv-btn-secondary {
    background: rgba(255,255,255,0.06);
    color: var(--text-secondary);
    border: 1px solid var(--border-subtle);
}
.cv-btn-secondary:hover { background: rgba(255,255,255,0.1); }
.cv-btn-sm { padding: 5px 10px; font-size: 0.72rem; }

/* Filter bar */
.cv-filters {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
}
.cv-filter-chips {
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
}
.cv-chip {
    background: rgba(255,255,255,0.04);
    border: 1px solid transparent;
    border-radius: 16px;
    color: var(--text-secondary);
    font-size: 0.7rem;
    padding: 4px 12px;
    cursor: pointer;
    transition: all 0.15s;
    font-family: inherit;
}
.cv-chip:hover { background: rgba(255,255,255,0.08); }
.cv-chip-active {
    background: rgba(212,168,83,0.15);
    border-color: var(--gold-primary);
    color: var(--gold-primary);
    font-weight: 500;
}
.cv-sort-wrap {
    display: flex;
    align-items: center;
    gap: 6px;
}
.cv-sort-label {
    font-size: 0.7rem;
    color: var(--text-muted);
}
.cv-sort-select {
    background: var(--bg-input);
    border: 1px solid var(--border-subtle);
    border-radius: 6px;
    color: var(--text-primary);
    font-size: 0.72rem;
    padding: 4px 8px;
    outline: none;
    font-family: inherit;
}
.cv-sort-select:focus { border-color: var(--gold-primary); }

/* Table */
.cv-table-wrap {
    flex: 1;
    overflow-y: auto;
    border-radius: 10px;
    border: 1px solid var(--border-subtle);
    background: var(--bg-card);
}
.cv-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.8rem;
}
.cv-th {
    position: sticky;
    top: 0;
    background: var(--bg-elevated);
    color: var(--text-muted);
    font-size: 0.65rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    padding: 10px 12px;
    text-align: left;
    border-bottom: 1px solid var(--border-subtle);
    white-space: nowrap;
    z-index: 1;
}
.cv-td {
    padding: 10px 12px;
    border-bottom: 1px solid rgba(255,255,255,0.03);
    color: var(--text-primary);
    vertical-align: middle;
}
.cv-row {
    cursor: pointer;
    transition: background 0.1s;
}
.cv-row:hover { background: rgba(255,255,255,0.03); }
.cv-row-active { background: rgba(212,168,83,0.08); }
.cv-empty {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-muted);
    font-size: 0.85rem;
}

/* Name cell */
.cv-name-cell {
    display: flex;
    align-items: center;
    gap: 8px;
}
.cv-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.6rem;
    font-weight: 700;
    color: #fff;
    flex-shrink: 0;
    background: #3b82f6;
}
.cv-avatar-university { background: var(--gold-primary); color: #1a1a2e; }
.cv-avatar-media { background: var(--media-accent); }
.cv-avatar-government { background: #22c55e; color: #1a1a2e; }
.cv-avatar-law_firm { background: #a78bfa; }
.cv-avatar-corporate, .cv-avatar-company { background: #60a5fa; }
.cv-avatar-nonprofit { background: #f472b6; }
.cv-name-text {
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 180px;
}
.cv-primary-badge {
    display: inline-block;
    background: rgba(212,168,83,0.2);
    color: var(--gold-primary);
    font-size: 0.55rem;
    font-weight: 700;
    padding: 1px 5px;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    vertical-align: middle;
    margin-left: 4px;
}

/* Org link */
.cv-org-link {
    color: var(--text-secondary);
    cursor: pointer;
    transition: color 0.1s;
    text-decoration: none;
}
.cv-org-link:hover { color: var(--gold-primary); text-decoration: underline; }

/* Email text */
.cv-email-text {
    color: var(--text-secondary);
    font-size: 0.75rem;
}
.cv-muted { color: var(--text-muted); }

/* Stage badges */
.cv-badge {
    display: inline-block;
    font-size: 0.6rem;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 10px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    white-space: nowrap;
}
.cv-badge-default { background: rgba(255,255,255,0.06); color: var(--text-muted); }
.cv-badge-prospect { background: rgba(245,158,11,0.15); color: #f59e0b; }
.cv-badge-dialogue { background: rgba(34,197,94,0.15); color: #22c55e; }
.cv-badge-partner { background: rgba(16,185,129,0.15); color: #10b981; }

/* Action buttons in table */
.cv-action-btn {
    background: none;
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 6px;
    color: var(--text-secondary);
    padding: 4px 6px;
    cursor: pointer;
    transition: all 0.15s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-right: 4px;
}
.cv-action-btn:hover {
    background: rgba(212,168,83,0.1);
    border-color: var(--gold-primary);
    color: var(--gold-primary);
}

/* Column widths */
.cv-th-name, .cv-td-name { min-width: 160px; }
.cv-th-title, .cv-td-title { min-width: 120px; max-width: 180px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cv-th-org, .cv-td-org { min-width: 140px; max-width: 200px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cv-th-email, .cv-td-email { min-width: 140px; max-width: 200px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cv-th-phone, .cv-td-phone { min-width: 100px; white-space: nowrap; }
.cv-th-last, .cv-td-last { min-width: 80px; white-space: nowrap; color: var(--text-secondary); font-size: 0.75rem; }
.cv-th-stage, .cv-td-stage { min-width: 80px; }
.cv-th-actions, .cv-td-actions { min-width: 70px; white-space: nowrap; }

/* Slide-over panel */
.cv-slideover {
    position: absolute;
    top: 0;
    right: 0;
    width: 360px;
    height: 100%;
    background: var(--bg-elevated);
    border-left: 1px solid var(--border-subtle);
    display: flex;
    flex-direction: column;
    z-index: 20;
    box-shadow: -4px 0 20px rgba(0,0,0,0.3);
    animation: cvSlideIn 0.2s ease;
}
@keyframes cvSlideIn {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}
.cv-slideover-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-subtle);
}
.cv-slideover-title {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-primary);
}
.cv-slideover-close {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1.4rem;
    cursor: pointer;
    padding: 0 4px;
    line-height: 1;
}
.cv-slideover-close:hover { color: var(--text-primary); }
.cv-slideover-body {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
}

/* Detail panel styles */
.cv-detail-header {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border-subtle);
}
.cv-detail-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.95rem;
    font-weight: 700;
    color: #fff;
    flex-shrink: 0;
    background: #3b82f6;
}
.cv-detail-info { flex: 1; }
.cv-detail-name {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
}
.cv-detail-title {
    font-size: 0.78rem;
    color: var(--text-secondary);
    margin-top: 2px;
}
.cv-detail-org {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 1px;
}
.cv-detail-section {
    margin-bottom: 18px;
}
.cv-detail-section-title {
    font-size: 0.6rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--gold-primary);
    margin-bottom: 8px;
}
.cv-detail-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 5px 0;
    font-size: 0.78rem;
}
.cv-detail-label {
    color: var(--text-muted);
    font-size: 0.72rem;
}
.cv-detail-value {
    color: var(--text-primary);
    text-align: right;
}
.cv-link {
    color: var(--gold-primary);
    text-decoration: none;
}
.cv-link:hover { text-decoration: underline; }
.cv-score {
    color: var(--gold-primary);
    font-weight: 600;
}
.cv-detail-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--border-subtle);
}

/* Responsive */
@media (max-width: 900px) {
    .cv-header { flex-direction: column; align-items: stretch; }
    .cv-header-right { justify-content: flex-end; }
    .cv-slideover { width: 100%; }
    .cv-th-phone, .cv-td-phone { display: none; }
    .cv-th-title, .cv-td-title { display: none; }
}

/* ===== CONTACTS VIEW — Enhanced (v2) ===== */

/* Stats bar */
.cv-stats-bar {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 4px;
}
.cv-stat-card {
    flex: 1;
    min-width: 120px;
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: 10px;
    padding: 12px 16px;
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.cv-stat-value {
    font-family: 'Space Grotesk', 'JetBrains Mono', monospace;
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.2;
}
.cv-stat-label {
    font-size: 0.65rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-weight: 500;
}
.cv-stat-sub {
    font-size: 0.62rem;
    color: var(--text-muted);
    font-style: italic;
}

/* Stage filter row */
.cv-stage-chips {
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
    margin-top: 4px;
}

/* Toggle buttons */
.cv-toggle-btn {
    background: rgba(255,255,255,0.04);
    border: 1px solid transparent;
    border-radius: 16px;
    color: var(--text-secondary);
    font-size: 0.7rem;
    padding: 4px 12px;
    cursor: pointer;
    transition: all 0.15s;
    font-family: inherit;
}
.cv-toggle-btn:hover { background: rgba(255,255,255,0.08); }
.cv-toggle-btn.active {
    background: rgba(59,130,246,0.15);
    border-color: #3b82f6;
    color: #60a5fa;
    font-weight: 500;
}

/* Bulk actions bar */
.cv-bulk-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 16px;
    background: rgba(212,168,83,0.08);
    border: 1px solid rgba(212,168,83,0.2);
    border-radius: 10px;
    margin-bottom: 4px;
}
.cv-bulk-count {
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--gold-primary);
    white-space: nowrap;
}
.cv-bulk-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: rgba(255,255,255,0.06);
    border: 1px solid var(--border-subtle);
    border-radius: 6px;
    color: var(--text-secondary);
    font-size: 0.72rem;
    padding: 4px 10px;
    cursor: pointer;
    font-family: inherit;
    transition: all 0.15s;
}
.cv-bulk-btn:hover { background: rgba(255,255,255,0.1); color: var(--text-primary); }

/* Checkbox column */
.cv-th-check, .cv-td-check { width: 36px; min-width: 36px; max-width: 36px; text-align: center; }
.cv-checkbox {
    width: 14px;
    height: 14px;
    accent-color: var(--gold-primary);
    cursor: pointer;
}

/* Reach column (replaces phone) */
.cv-th-reach, .cv-td-reach { min-width: 60px; max-width: 80px; white-space: nowrap; }
.cv-reach-icons { display: flex; gap: 4px; align-items: center; }
.cv-reach-icon {
    width: 14px;
    height: 14px;
    color: var(--text-muted);
    opacity: 0.5;
}
.cv-reach-icon.has { color: #22c55e; opacity: 1; }

/* Priority column */
.cv-th-priority, .cv-td-priority { min-width: 50px; max-width: 60px; text-align: center; }
.cv-priority-num {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.72rem;
    font-weight: 700;
}

/* Emails sent column */
.cv-th-sent, .cv-td-sent { min-width: 40px; max-width: 50px; text-align: center; font-size: 0.72rem; color: var(--text-muted); }

/* Sortable headers */
.cv-th-sortable {
    cursor: pointer;
    user-select: none;
}
.cv-th-sortable:hover { color: var(--gold-primary); }
.cv-sort-arrow {
    font-size: 0.55rem;
    margin-left: 3px;
    opacity: 0.5;
}
.cv-th-sortable.active .cv-sort-arrow { opacity: 1; color: var(--gold-primary); }

/* Type border on rows */
.cv-row-typed { border-left: 3px solid transparent; }

/* Timeline in slideover */
.cv-timeline-section { margin-top: 16px; }
.cv-timeline-item {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    padding: 6px 0;
    border-bottom: 1px solid rgba(255,255,255,0.03);
}
.cv-timeline-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--gold-primary);
    margin-top: 5px;
    flex-shrink: 0;
}
.cv-timeline-text {
    font-size: 0.75rem;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.cv-timeline-meta {
    font-size: 0.65rem;
    color: var(--text-muted);
}

/* ===== ORG PROFILE VIEW ===== */

.op-container {
    flex-direction: column;
    height: 100%;
    overflow-y: auto;
    padding: 1.5rem;
}

.op-two-col {
    display: grid;
    grid-template-columns: 65fr 35fr;
    gap: 24px;
    max-width: 1400px;
}

.op-left {
    display: flex;
    flex-direction: column;
    gap: 16px;
    min-width: 0;
}

.op-right {
    display: flex;
    flex-direction: column;
    gap: 16px;
    position: sticky;
    top: 0;
    align-self: flex-start;
}

/* Header */
.op-header {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 4px;
}
.op-breadcrumb {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.7rem;
    color: var(--text-muted);
}
.op-breadcrumb a {
    color: var(--text-secondary);
    text-decoration: none;
    cursor: pointer;
}
.op-breadcrumb a:hover { color: var(--gold-primary); }
.op-breadcrumb .sep { opacity: 0.4; }
.op-back-btn {
    background: rgba(255,255,255,0.06);
    border: 1px solid var(--border-subtle);
    border-radius: 8px;
    color: var(--text-secondary);
    padding: 6px 12px;
    font-size: 0.75rem;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-family: inherit;
    transition: all 0.15s;
    align-self: flex-start;
}
.op-back-btn:hover { background: rgba(255,255,255,0.1); color: var(--text-primary); }
.op-header-row {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}
.op-org-name {
    font-family: 'Space Grotesk', 'Inter', sans-serif;
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.01em;
}
.op-type-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 0.68rem;
    font-weight: 600;
    padding: 3px 10px;
    border-radius: 12px;
    background: rgba(255,255,255,0.06);
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.op-type-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    display: inline-block;
}
.op-stage-badge {
    display: inline-block;
    font-size: 0.62rem;
    font-weight: 600;
    padding: 2px 10px;
    border-radius: 10px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

/* Cards */
.op-card {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: 12px;
    padding: 18px 20px;
}
.op-card-title {
    font-size: 0.62rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-muted);
    margin-bottom: 12px;
}

/* Priority bar */
.op-priority-bar {
    height: 6px;
    background: rgba(255,255,255,0.06);
    border-radius: 3px;
    overflow: hidden;
}
.op-priority-fill {
    height: 100%;
    border-radius: 3px;
    transition: width 0.3s ease;
}
.op-priority-row {
    display: flex;
    align-items: center;
    gap: 12px;
}
.op-priority-score {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.85rem;
    font-weight: 700;
    min-width: 30px;
    text-align: right;
}
.op-priority-meta {
    font-size: 0.72rem;
    color: var(--text-muted);
    margin-top: 4px;
}

/* SVS dimension bars */
.op-svs-bars {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-top: 10px;
}
.op-svs-row {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.68rem;
}
.op-svs-label {
    width: 60px;
    color: var(--text-muted);
    flex-shrink: 0;
    text-align: right;
}
.op-svs-track {
    flex: 1;
    height: 5px;
    background: rgba(255,255,255,0.06);
    border-radius: 3px;
    overflow: hidden;
}
.op-svs-fill {
    height: 100%;
    border-radius: 3px;
}
.op-svs-val {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.6rem;
    color: var(--text-muted);
    min-width: 35px;
}

/* Contact table */
.op-contact-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.78rem;
}
.op-contact-table th {
    text-align: left;
    font-size: 0.62rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    padding: 6px 8px;
    border-bottom: 1px solid var(--border-subtle);
}
.op-contact-table td {
    padding: 8px 8px;
    border-bottom: 1px solid rgba(255,255,255,0.03);
    color: var(--text-primary);
    vertical-align: middle;
}
.op-contact-table tr:hover { background: rgba(255,255,255,0.02); }
.op-contact-email {
    color: var(--gold-primary);
    text-decoration: none;
    font-size: 0.72rem;
}
.op-contact-email:hover { text-decoration: underline; }

/* Research grid */
.op-research-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-top: 10px;
}
.op-research-cat {
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 8px;
    padding: 8px 10px;
    cursor: pointer;
    transition: all 0.15s;
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.72rem;
    color: var(--text-secondary);
}
.op-research-cat:hover { background: rgba(255,255,255,0.06); border-color: rgba(255,255,255,0.1); }
.op-research-cat.done {
    border-color: rgba(34,197,94,0.2);
}
.op-research-cat .op-cat-icon {
    font-size: 0.75rem;
    flex-shrink: 0;
}
.op-research-cat.done .op-cat-icon { color: #22c55e; }
.op-research-cat:not(.done) .op-cat-icon { color: var(--text-muted); opacity: 0.4; }
.op-cat-expanded {
    margin-top: 6px;
    padding-top: 6px;
    border-top: 1px solid rgba(255,255,255,0.05);
    font-size: 0.68rem;
    color: var(--text-muted);
    line-height: 1.4;
    max-height: 100px;
    overflow-y: auto;
}

/* Timeline */
.op-timeline-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 8px 0;
    border-bottom: 1px solid rgba(255,255,255,0.03);
}
.op-timeline-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--gold-primary);
    margin-top: 5px;
    flex-shrink: 0;
}
.op-timeline-body { flex: 1; min-width: 0; }
.op-timeline-subject {
    font-size: 0.78rem;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.op-timeline-meta {
    font-size: 0.65rem;
    color: var(--text-muted);
    margin-top: 1px;
}

/* Metadata tags */
.op-meta-tag {
    display: inline-block;
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 6px;
    font-size: 0.68rem;
    color: var(--text-secondary);
    padding: 3px 8px;
    margin: 2px 3px 2px 0;
}
.op-meta-keytag {
    border-color: rgba(212,168,83,0.3);
    color: var(--gold-primary);
}
.op-meta-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}

/* Sidebar */
.op-action-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    background: rgba(255,255,255,0.04);
    border: 1px solid var(--border-subtle);
    border-radius: 8px;
    color: var(--text-secondary);
    font-size: 0.78rem;
    padding: 10px 14px;
    cursor: pointer;
    font-family: inherit;
    transition: all 0.15s;
    text-align: left;
}
.op-action-btn:hover { background: rgba(255,255,255,0.08); color: var(--text-primary); border-color: rgba(255,255,255,0.12); }
.op-action-btn.primary {
    background: linear-gradient(135deg, var(--gold-primary), var(--gold-dark, #b8922e));
    color: #1a1a2e;
    border-color: transparent;
    font-weight: 600;
}
.op-action-btn.primary:hover { opacity: 0.9; }
.op-action-stack {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

/* At-a-glance card */
.op-glance-card {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: 12px;
    padding: 16px 18px;
}
.op-glance-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 5px 0;
    font-size: 0.75rem;
}
.op-glance-label {
    color: var(--text-muted);
    font-size: 0.68rem;
}
.op-glance-value {
    color: var(--text-primary);
    font-weight: 500;
}

/* Empty state */
.op-empty {
    text-align: center;
    padding: 40px;
    color: var(--text-muted);
    font-size: 0.85rem;
}

/* Score header */
.op-score-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
}
.op-score-label {
    font-size: 0.75rem;
    color: var(--text-muted);
}
.op-score-value {
    font-size: 0.85rem;
    font-weight: 600;
}
.op-score-extras {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 10px;
    font-size: 0.75rem;
    color: var(--text-muted);
}
.op-score-extra strong {
    color: var(--text-primary);
}

/* Contact table extras */
.op-contact-table-wrap {
    overflow-x: auto;
    margin-bottom: 10px;
}
.op-contact-name {
    font-weight: 500;
    white-space: nowrap;
}
.op-primary-badge {
    display: inline-block;
    font-size: 0.55rem;
    font-weight: 600;
    text-transform: uppercase;
    padding: 1px 5px;
    border-radius: 3px;
    background: rgba(212,168,83,0.15);
    color: #D4A853;
    margin-left: 4px;
    vertical-align: middle;
}
.op-stage-badge-sm {
    display: inline-block;
    font-size: 0.65rem;
    padding: 1px 6px;
    border-radius: 4px;
    border: 1px solid;
    white-space: nowrap;
}
.op-muted {
    color: var(--text-muted);
    opacity: 0.6;
}
.op-add-contact-btn {
    margin-top: 8px;
}

/* Research header */
.op-research-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
}
.op-research-bar-wrap {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 8px;
}
.op-research-pct {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-primary);
    min-width: 32px;
    text-align: right;
}
.op-freshness-badge {
    font-size: 0.65rem;
    padding: 2px 8px;
    border-radius: 4px;
    border: 1px solid;
    white-space: nowrap;
}
.op-research-cat-header {
    display: flex;
    align-items: center;
    gap: 6px;
}
.op-research-cat-name {
    font-size: 0.75rem;
    font-weight: 500;
}
.op-research-actions {
    display: flex;
    gap: 8px;
    margin-top: 12px;
}

/* Metadata extras */
.op-meta-keytags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 8px;
}
.op-pain-points {
    margin-top: 10px;
}
.op-pain-label {
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--text-muted);
    margin-bottom: 4px;
}
.op-pain-list {
    margin: 0;
    padding-left: 16px;
    font-size: 0.75rem;
    color: var(--text-secondary, var(--text-muted));
}
.op-pain-list li {
    margin-bottom: 2px;
}

/* Responsive */
@media (max-width: 900px) {
    .op-two-col {
        grid-template-columns: 1fr;
    }
    .op-right {
        position: static;
    }
    .op-research-grid {
        grid-template-columns: 1fr;
    }
}

/* ═══════════════════════════════════════════════════════════
   MODAL MANAGER — Backdrop & Utilities (Phase 5)
   ═══════════════════════════════════════════════════════════ */

.mm-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    opacity: 0;
    transition: opacity 0.2s ease;
    pointer-events: auto;
}
.mm-backdrop--active {
    opacity: 1;
}

/* ═══════════════════════════════════════════════════════════════
   Research Quick Panel — slide-over from Big Board research dots
   ═══════════════════════════════════════════════════════════════ */

.rqp-overlay {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: 420px;
    max-width: 100vw;
    z-index: 10100;
    display: flex;
    flex-direction: column;
    background: var(--bg-elevated, #1a1a2e);
    border-left: 1px solid var(--border-subtle, #2a2a4a);
    box-shadow: -8px 0 32px rgba(0,0,0,0.5);
    transform: translateX(100%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
}
.rqp-overlay.rqp-open {
    transform: translateX(0);
}

/* Header */
.rqp-header {
    flex-shrink: 0;
    border-bottom: 1px solid var(--border-subtle, #2a2a4a);
    background: rgba(0,0,0,0.15);
}
.rqp-header-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    padding: 16px 20px 0;
}
.rqp-header-info {
    flex: 1;
    min-width: 0;
}
.rqp-org-name {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary, #e0e0e0);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.rqp-org-type {
    font-size: 0.75rem;
    color: var(--gold-primary, #d4a843);
    margin-top: 2px;
}
.rqp-close {
    background: none;
    border: none;
    color: var(--text-muted, #888);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0 4px;
    line-height: 1;
    transition: color 0.15s;
}
.rqp-close:hover { color: var(--text-primary, #e0e0e0); }

/* Progress */
.rqp-progress-section {
    padding: 12px 20px 14px;
}
.rqp-progress-label {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.75rem;
    color: var(--text-secondary, #aaa);
    margin-bottom: 6px;
}
.rqp-progress-pct {
    font-weight: 600;
    color: var(--text-primary, #e0e0e0);
}
.rqp-progress-bar {
    height: 6px;
    background: rgba(255,255,255,0.08);
    border-radius: 3px;
    overflow: hidden;
}
.rqp-progress-fill {
    height: 100%;
    border-radius: 3px;
    transition: width 0.5s ease;
}
.rqp-progress-detail {
    font-size: 0.68rem;
    color: var(--text-muted, #888);
    margin-top: 4px;
}
.rqp-last-researched {
    font-size: 0.68rem;
    color: var(--text-muted, #888);
    padding: 0 20px 12px;
}

/* Category list */
.rqp-categories {
    flex: 1;
    overflow-y: auto;
    padding: 4px 0;
}
.rqp-section-label {
    font-size: 0.68rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted, #888);
    padding: 10px 20px 4px;
}
.rqp-cat-row {
    border-bottom: 1px solid rgba(255,255,255,0.04);
}
.rqp-cat-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 20px;
    cursor: pointer;
    transition: background 0.15s;
}
.rqp-cat-header:hover {
    background: rgba(255,255,255,0.04);
}
.rqp-status-icon {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}
.rqp-status-done { color: #10b981; }
.rqp-status-missing { color: rgba(255,255,255,0.15); }

.rqp-cat-icon {
    font-size: 0.85rem;
    flex-shrink: 0;
}
.rqp-cat-title {
    flex: 1;
    font-size: 0.8rem;
    color: var(--text-primary, #e0e0e0);
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.rqp-cat-age {
    font-size: 0.65rem;
    color: var(--text-muted, #888);
    white-space: nowrap;
    flex-shrink: 0;
}
.rqp-cat-expand {
    font-size: 0.6rem;
    color: var(--text-muted, #888);
    flex-shrink: 0;
    width: 12px;
    text-align: center;
}
.rqp-cat-research-btn {
    font-size: 0.68rem;
    padding: 2px 8px;
    border-radius: 4px;
    border: 1px solid rgba(59,130,246,0.3);
    background: rgba(59,130,246,0.1);
    color: #3b82f6;
    cursor: pointer;
    white-space: nowrap;
    flex-shrink: 0;
    transition: background 0.15s, border-color 0.15s;
}
.rqp-cat-research-btn:hover {
    background: rgba(59,130,246,0.2);
    border-color: rgba(59,130,246,0.5);
}
.rqp-cat-research-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Expanded body */
.rqp-cat-body {
    padding: 4px 20px 12px 44px;
}
.rqp-cat-snippet {
    font-size: 0.75rem;
    color: var(--text-secondary, #aaa);
    line-height: 1.5;
    background: rgba(255,255,255,0.03);
    border-radius: 6px;
    padding: 8px 10px;
    border: 1px solid rgba(255,255,255,0.06);
}
.rqp-cat-empty {
    font-size: 0.75rem;
    color: var(--text-muted, #888);
    font-style: italic;
}

/* Footer */
.rqp-footer {
    flex-shrink: 0;
    padding: 14px 20px;
    border-top: 1px solid var(--border-subtle, #2a2a4a);
    display: flex;
    flex-direction: column;
    gap: 8px;
    background: rgba(0,0,0,0.1);
}
.rqp-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 500;
    cursor: pointer;
    border: 1px solid transparent;
    transition: background 0.15s, border-color 0.15s;
}
.rqp-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}
.rqp-btn-primary {
    background: rgba(59,130,246,0.15);
    border-color: rgba(59,130,246,0.3);
    color: #3b82f6;
}
.rqp-btn-primary:hover:not(:disabled) {
    background: rgba(59,130,246,0.25);
    border-color: rgba(59,130,246,0.5);
}
.rqp-btn-secondary {
    background: rgba(255,255,255,0.05);
    border-color: rgba(255,255,255,0.1);
    color: var(--text-secondary, #aaa);
}
.rqp-btn-secondary:hover {
    background: rgba(255,255,255,0.1);
    border-color: rgba(255,255,255,0.2);
    color: var(--text-primary, #e0e0e0);
}
.rqp-all-complete {
    text-align: center;
    font-size: 0.8rem;
    color: #10b981;
    font-weight: 500;
    padding: 4px 0;
}

/* Spinners */
.rqp-spinner {
    display: inline-block;
    width: 14px;
    height: 14px;
    border: 2px solid rgba(59,130,246,0.3);
    border-top-color: #3b82f6;
    border-radius: 50%;
    animation: rqp-spin 0.6s linear infinite;
}
.rqp-spinner-sm {
    display: inline-block;
    width: 10px;
    height: 10px;
    border: 2px solid rgba(59,130,246,0.3);
    border-top-color: #3b82f6;
    border-radius: 50%;
    animation: rqp-spin 0.6s linear infinite;
}
@keyframes rqp-spin {
    to { transform: rotate(360deg); }
}

/* Mobile */
@media (max-width: 600px) {
    .rqp-overlay { width: 100vw; }
}

/* ===== CAMPAIGN RESPONSE INTELLIGENCE (CRI) ===== */
.cri-dashboard {
    padding: 0;
    min-height: 400px;
}

.cri-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 4rem 2rem;
    color: var(--text-muted);
    gap: 1rem;
}

.cri-spinner {
    width: 32px;
    height: 32px;
    border: 3px solid rgba(212, 168, 83, 0.15);
    border-top-color: var(--gold-primary);
    border-radius: 50%;
    animation: cri-spin 0.7s linear infinite;
}

@keyframes cri-spin {
    to { transform: rotate(360deg); }
}

.cri-error { padding: 2rem; }

.cri-error-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    padding: 2rem;
    text-align: center;
    color: var(--text-muted);
    background: rgba(248, 113, 113, 0.06);
    border: 1px solid rgba(248, 113, 113, 0.15);
    border-radius: 12px;
}

.cri-error-box svg { color: var(--error); }

.cri-error-detail {
    font-size: 12px;
    color: var(--text-muted);
    font-family: 'JetBrains Mono', monospace;
}

.cri-retry-btn {
    margin-top: 0.5rem;
    padding: 8px 20px;
    background: rgba(212, 168, 83, 0.12);
    border: 1px solid var(--border-subtle);
    border-radius: 8px;
    color: var(--gold-primary);
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.2s ease;
}

.cri-retry-btn:hover {
    background: rgba(212, 168, 83, 0.2);
    border-color: var(--border-strong);
}

/* Header */
.cri-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    padding: 1.5rem 1.5rem 0.5rem;
}

.cri-header h3 {
    font-family: 'Cinzel', serif;
    font-size: 1.1rem;
    color: var(--gold-primary);
    letter-spacing: 0.04em;
    margin-bottom: 0.25rem;
}

.cri-subtitle {
    font-size: 13px;
    color: var(--text-muted);
}

.cri-refresh-btn {
    padding: 8px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
}

.cri-refresh-btn:hover {
    background: rgba(212, 168, 83, 0.1);
    border-color: var(--border-subtle);
    color: var(--gold-primary);
}

/* Sections */
.cri-section {
    padding: 0 1.5rem 1.5rem;
}

.cri-section-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 1rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

/* Campaign Stats Grid */
.cri-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1rem;
}

.cri-campaign-card {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 12px;
    padding: 1.25rem;
    transition: all 0.2s ease;
}

.cri-campaign-card:hover {
    border-color: rgba(255, 255, 255, 0.12);
    background: rgba(0, 0, 0, 0.35);
}

.cri-card-name-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.75rem;
}

.cri-card-name {
    font-weight: 600;
    font-size: 15px;
    color: var(--text-primary);
}

.cri-response-rate {
    font-size: 13px;
    font-weight: 600;
}

/* Sentiment bar */
.cri-sentiment-bar {
    display: flex;
    height: 6px;
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 1rem;
    background: rgba(255, 255, 255, 0.04);
}

.cri-sentiment-seg {
    transition: width 0.4s ease;
    min-width: 0;
}

.cri-sentiment-seg.cri-pos { background: #22c55e; }
.cri-sentiment-seg.cri-neg { background: #ef4444; }
.cri-sentiment-seg.cri-neu { background: rgba(212, 168, 83, 0.5); }
.cri-sentiment-seg.cri-empty { background: rgba(255, 255, 255, 0.04); }

/* Metric pills */
.cri-card-actions {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 0.75rem;
}

.cri-action-label {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 10px;
    border-radius: 4px;
    background: rgba(0, 0, 0, 0.15);
    font-size: 0.75rem;
}

.cri-action-count {
    font-weight: 700;
    font-size: 0.85rem;
    min-width: 20px;
}

.cri-action-text {
    color: var(--text-secondary, #ccc);
}

/* Legacy pill support */
.cri-card-metrics { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-bottom: 0.75rem; }
.cri-metric-pill { display: none; /* replaced by action labels */ }
.cri-metric-val {
    font-weight: 700;
    font-size: 13px;
}

.cri-metric-label {
    opacity: 0.8;
    font-size: 11px;
}

/* Card footer */
.cri-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.cri-card-meta {
    font-size: 11px;
    color: var(--text-muted);
}

/* Pattern Cards */
.cri-patterns-grid {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.cri-pattern-card {
    background: rgba(0, 0, 0, 0.25);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 10px;
    overflow: hidden;
    transition: border-color 0.2s ease;
}

.cri-pattern-card:hover {
    border-color: rgba(255, 255, 255, 0.1);
}

.cri-pattern-card.cri-pat-positive { border-left: 3px solid #22c55e; }
.cri-pattern-card.cri-pat-negative { border-left: 3px solid #ef4444; }
.cri-pattern-card.cri-pat-neutral { border-left: 3px solid var(--gold-primary); }

.cri-pattern-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.875rem 1rem;
    cursor: pointer;
    transition: background 0.15s ease;
}

.cri-pattern-header:hover {
    background: rgba(255, 255, 255, 0.03);
}

.cri-pattern-icon {
    width: 28px;
    height: 28px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    flex-shrink: 0;
}

.cri-pat-positive .cri-pattern-icon {
    background: rgba(34, 197, 94, 0.12);
    color: #22c55e;
}

.cri-pat-negative .cri-pattern-icon {
    background: rgba(239, 68, 68, 0.12);
    color: #ef4444;
}

.cri-pat-neutral .cri-pattern-icon {
    background: rgba(212, 168, 83, 0.12);
    color: var(--gold-primary);
}

.cri-pattern-summary {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.cri-pattern-text {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
}

.cri-pattern-campaign {
    font-size: 11px;
    color: var(--text-muted);
}

.cri-pattern-chevron {
    flex-shrink: 0;
    color: var(--text-muted);
    transition: transform 0.2s ease;
}

.cri-pattern-card.expanded .cri-pattern-chevron {
    transform: rotate(180deg);
}

.cri-pattern-details {
    display: none;
    border-top: 1px solid rgba(255, 255, 255, 0.04);
    padding: 0;
}

.cri-pattern-card.expanded .cri-pattern-details {
    display: block;
}

.cri-response-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.625rem 1rem 0.625rem 2.75rem;
    font-size: 13px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.02);
}

.cri-response-item:last-child { border-bottom: none; }

.cri-response-org {
    font-weight: 500;
    color: var(--text-secondary);
    min-width: 120px;
    flex-shrink: 0;
}

.cri-response-snippet {
    flex: 1;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.cri-response-date {
    font-size: 11px;
    color: var(--text-muted);
    flex-shrink: 0;
    opacity: 0.7;
}

.cri-pattern-empty {
    padding: 1rem 1rem 1rem 2.75rem;
    color: var(--text-muted);
    font-size: 12px;
    font-style: italic;
}

/* Common Questions */
.cri-questions-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.cri-question-card {
    display: flex;
    gap: 0.875rem;
    padding: 1rem;
    background: rgba(0, 0, 0, 0.25);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 10px;
    transition: border-color 0.2s ease;
}

.cri-question-card:hover {
    border-color: rgba(212, 168, 83, 0.2);
}

.cri-question-icon {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: rgba(212, 168, 83, 0.1);
    color: var(--gold-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 16px;
    flex-shrink: 0;
}

.cri-question-body {
    flex: 1;
    min-width: 0;
}

.cri-question-text {
    font-size: 14px;
    color: var(--text-primary);
    line-height: 1.5;
    margin-bottom: 0.5rem;
}

.cri-question-meta {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.cri-question-tag {
    font-size: 11px;
    padding: 2px 8px;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-secondary);
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.cri-question-count {
    font-size: 11px;
    color: var(--gold-primary);
    font-weight: 500;
}

/* Empty State */
.cri-empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 4rem 2rem;
    text-align: center;
    color: var(--text-muted);
    gap: 0.75rem;
}

.cri-empty-state svg {
    color: rgba(212, 168, 83, 0.25);
}

.cri-empty-state h4 {
    font-size: 16px;
    color: var(--text-secondary);
    font-weight: 500;
}

.cri-empty-state p {
    font-size: 13px;
    max-width: 360px;
}

/* Responsive */
@media (max-width: 768px) {
    .cri-stats-grid {
        grid-template-columns: 1fr;
    }
    .cri-response-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.25rem;
        padding-left: 1rem;
    }
    .cri-response-org { min-width: 0; }
}

/* ===== Communications Director Status Panel ===== */

/* ── Health Indicator (top of Big Board header) ── */
.bb-director-health {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: 'Space Grotesk', 'Inter', sans-serif;
    font-size: 0.72rem;
    font-weight: 600;
    padding: 6px 14px;
    border-radius: 20px;
    background: linear-gradient(135deg, rgba(255,255,255,0.05), rgba(255,255,255,0.02));
    border: 1px solid rgba(255,255,255,0.08);
    cursor: default;
    letter-spacing: 0.02em;
    backdrop-filter: blur(8px);
}
.bb-director-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}
.bb-director-dot--healthy {
    background: var(--success);
    box-shadow: 0 0 6px rgba(74, 222, 128, 0.4);
}
.bb-director-dot--attention {
    background: var(--warning);
    box-shadow: 0 0 6px rgba(251, 191, 36, 0.4);
}
.bb-director-dot--critical {
    background: var(--error);
    box-shadow: 0 0 6px rgba(248, 113, 113, 0.4);
    animation: bb-director-pulse 1.5s infinite;
}
@keyframes bb-director-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}
.bb-director-label {
    color: var(--text-secondary);
}
.bb-director-count {
    color: var(--text-muted);
    font-size: 0.65rem;
    margin-left: 2px;
}

/* ── Ben's Queue Card ── */
.bb-director-queue {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: 10px;
    padding: 14px 16px;
    margin-bottom: 14px;
}
.bb-director-queue-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
}
.bb-director-queue-title {
    font-family: 'Space Grotesk', 'Inter', sans-serif;
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--gold-primary);
    letter-spacing: 0.08em;
    text-transform: uppercase;
}
.bb-director-queue-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: rgba(212, 168, 83, 0.15);
    color: var(--gold-light);
    font-family: 'Space Grotesk', sans-serif;
    font-size: 0.7rem;
    font-weight: 600;
    padding: 2px 10px;
    border-radius: 12px;
}
.bb-director-queue-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.bb-director-queue-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    border-radius: 8px;
    background: rgba(255,255,255,0.02);
    border-left: 3px solid var(--gold-dark);
    cursor: pointer;
    transition: background 0.15s;
}
.bb-director-queue-item:hover {
    background: rgba(212, 168, 83, 0.08);
}
.bb-director-queue-item-org {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 180px;
}
.bb-director-queue-item-subject {
    font-size: 0.72rem;
    color: var(--text-secondary);
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.bb-director-queue-item-reason {
    font-size: 0.65rem;
    color: var(--warning);
    font-weight: 500;
    white-space: nowrap;
}
.bb-director-queue-item-time {
    font-size: 0.62rem;
    color: var(--text-muted);
    font-family: 'JetBrains Mono', monospace;
    white-space: nowrap;
}
.bb-director-queue-empty {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-align: center;
    padding: 12px 0;
}

/* ── Active Patterns ── */
.bb-director-patterns {
    margin-top: 12px;
    padding: 10px 0 0;
    border-top: 1px solid rgba(255,255,255,0.04);
}
.bb-director-patterns-title {
    font-family: 'Space Grotesk', 'Inter', sans-serif;
    font-size: 0.68rem;
    font-weight: 600;
    color: var(--text-muted);
    letter-spacing: 0.06em;
    text-transform: uppercase;
    margin-bottom: 8px;
}
.bb-director-pattern-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 4px 0;
    font-size: 0.72rem;
    color: var(--text-secondary);
}
.bb-director-pattern-count {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 600;
    color: var(--gold-primary);
    min-width: 20px;
    text-align: right;
}
.bb-director-pattern-text {
    color: var(--text-secondary);
}

/* ═══════════════════════════════════════════════════════════════════════════
   COMMS V2 — Immersive Inbox
   Listenr-inspired atmospheric design: glass surfaces, radial glows, breathing
   ═══════════════════════════════════════════════════════════════════════════ */

/* ── Tokens ── */
:root {
    --cv2-bg-deep: #040608;
    --cv2-bg-mid: #070b12;
    --cv2-bg-upper: #0c1524;
    --cv2-surface-card: rgba(255,255,255,0.03);
    --cv2-surface-hover: rgba(255,255,255,0.06);
    --cv2-surface-expanded: rgba(255,255,255,0.04);
    --cv2-border-glass: rgba(255,255,255,0.06);
    --cv2-border-hover: rgba(255,255,255,0.10);
    --cv2-gold: #D4A853;
    --cv2-gold-dim: rgba(212,168,83,0.15);
    --cv2-gold-glow: rgba(212,168,83,0.08);
    --cv2-blue: #3b82f6;
    --cv2-blue-dim: rgba(59,130,246,0.15);
    --cv2-blue-glow: rgba(59,130,246,0.08);
    --cv2-green: #22c55e;
    --cv2-green-dim: rgba(34,197,94,0.15);
    --cv2-amber: #f59e0b;
    --cv2-amber-dim: rgba(245,158,11,0.15);
    --cv2-red: #ef4444;
    --cv2-red-dim: rgba(239,68,68,0.15);
    --cv2-text-primary: #e2e8f0;
    --cv2-text-secondary: #94a3b8;
    --cv2-text-muted: #475569;
    --cv2-font-body: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    --cv2-font-mono: 'JetBrains Mono', monospace;
    --cv2-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
    --cv2-ease: cubic-bezier(0.4, 0, 0.2, 1);
    --cv2-radius: 12px;
    --cv2-radius-sm: 8px;
    --cv2-radius-pill: 20px;
}

/* ── Animations ── */
@keyframes cv2-breathe {
    0%, 100% { opacity: 0.6; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.15); }
}
@keyframes cv2-slideDown {
    from { opacity: 0; max-height: 0; transform: translateY(-8px); }
    to { opacity: 1; max-height: 1200px; transform: translateY(0); }
}
@keyframes cv2-glideIn {
    from { opacity: 0; transform: translateX(20px); }
    to { opacity: 1; transform: translateX(0); }
}
@keyframes cv2-fadeUp {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: translateY(0); }
}
@keyframes cv2-cardIn {
    from { opacity: 0; transform: translateY(8px) scale(0.98); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

/* ── Atmospheric Background ── */
.comms-v2-atmosphere {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
}
.comms-v2-atmosphere::before,
.comms-v2-atmosphere::after,
.comms-v2-atmosphere .cv2-atmo-layer {
    content: '';
    position: absolute;
    inset: 0;
}
.comms-v2-atmosphere::before {
    background: radial-gradient(ellipse at 30% 20%, rgba(212,168,83,0.06) 0%, transparent 50%);
}
.comms-v2-atmosphere::after {
    background: radial-gradient(ellipse at 70% 30%, rgba(59,130,246,0.05) 0%, transparent 50%);
}
.comms-v2-atmosphere .cv2-atmo-layer {
    background: radial-gradient(ellipse at 50% 90%, rgba(52,211,153,0.06) 0%, transparent 40%);
}

/* ── Main Container ── */
.comms-v2-container {
    position: relative;
    height: 100%;
    display: flex;
    flex-direction: column;
    background: radial-gradient(ellipse at 50% 80%, var(--cv2-bg-upper) 0%, var(--cv2-bg-mid) 50%, var(--cv2-bg-deep) 100%);
    font-family: var(--cv2-font-body);
    color: var(--cv2-text-primary);
    z-index: 1;
    overflow: hidden;
}

/* ── Body Grid (Sidebar + Feed) ── */
.comms-v2-body {
    display: grid;
    grid-template-columns: 200px 1fr;
    gap: 0;
    flex: 1;
    overflow: hidden;
    position: relative;
}

/* Make sidebar and feed scroll independently */
.comms-v2-sidebar {
    overflow-y: auto;
    max-height: 100%;
}
.comms-v2-feed {
    overflow-y: auto;
    max-height: 100%;
}

/* ── Streams Sidebar ── */
.comms-v2-sidebar {
    padding: 16px 12px;
    border-right: 1px solid rgba(255,255,255,0.04);
    background: rgba(0,0,0,0.15);
    backdrop-filter: blur(8px);
    display: flex;
    flex-direction: column;
    gap: 4px;
    overflow-y: auto;
}
.comms-v2-sidebar-label {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.1em;
    color: rgba(255,255,255,0.35);
    padding: 12px 8px 6px;
    text-transform: uppercase;
    font-family: var(--cv2-font-mono, 'JetBrains Mono', monospace);
}
.comms-v2-stream {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 200ms ease-out;
    position: relative;
}
.comms-v2-stream:hover {
    background: rgba(255,255,255,0.04);
}
.comms-v2-stream.active {
    background: rgba(212,168,83,0.08);
}
.comms-v2-stream-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
    position: relative;
}
.comms-v2-stream-dot.gold {
    background: #D4A853;
    box-shadow: 0 0 8px rgba(212,168,83,0.4);
    animation: cv2-breathe 3s ease-in-out infinite;
}
.comms-v2-stream-dot.blue { background: #3b82f6; box-shadow: 0 0 6px rgba(59,130,246,0.3); }
.comms-v2-stream-dot.amber { background: #f59e0b; box-shadow: 0 0 6px rgba(245,158,11,0.3); }
.comms-v2-stream-dot.gray { background: #4b5563; }
.comms-v2-stream-label {
    flex: 1;
    font-size: 13px;
    font-weight: 500;
    color: rgba(255,255,255,0.8);
}
.comms-v2-stream.active .comms-v2-stream-label { color: #D4A853; font-weight: 600; }
.comms-v2-stream-count {
    font-family: var(--cv2-font-mono, 'JetBrains Mono', monospace);
    font-size: 11px;
    font-weight: 600;
    color: rgba(255,255,255,0.4);
    min-width: 20px;
    text-align: right;
}
.comms-v2-stream.active .comms-v2-stream-count { color: #D4A853; }

/* ── Account Items ── */
.comms-v2-account {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 10px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 12px;
    color: rgba(255,255,255,0.5);
    transition: all 150ms ease-out;
}
.comms-v2-account:hover { background: rgba(255,255,255,0.04); color: rgba(255,255,255,0.8); }
.comms-v2-account.active { color: #D4A853; }
.comms-v2-account-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    flex-shrink: 0;
}

/* ── Header Bar ── */
.comms-v2-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 24px;
    padding-right: 100px; /* Clear BenOS toggle (fixed top-right z:10000) */
    border-bottom: 1px solid rgba(255,255,255,0.04);
    background: rgba(255,255,255,0.01);
    backdrop-filter: blur(12px);
    position: relative;
    z-index: 10;
}
.comms-v2-header-left {
    display: flex;
    align-items: center;
    gap: 16px;
}
.comms-v2-title {
    font-size: 15px;
    font-weight: 600;
    letter-spacing: 0.04em;
    background: linear-gradient(135deg, var(--cv2-gold), #e8c977);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.comms-v2-director-status {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    color: var(--cv2-text-secondary);
    font-family: var(--cv2-font-mono);
}
.comms-v2-director-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--cv2-green);
    box-shadow: 0 0 8px rgba(34,197,94,0.4);
}
.comms-v2-header-stats {
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: var(--cv2-font-mono);
}
.comms-v2-header-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}
.comms-v2-header-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: var(--cv2-radius-sm);
    background: var(--cv2-surface-card);
    border: 1px solid var(--cv2-border-glass);
    color: var(--cv2-text-secondary);
    cursor: pointer;
    transition: all 200ms var(--cv2-ease);
    backdrop-filter: blur(4px);
}
.comms-v2-header-btn:hover {
    background: var(--cv2-surface-hover);
    color: var(--cv2-gold);
    border-color: var(--cv2-gold-dim);
}
.comms-v2-compose-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 7px 14px;
    border-radius: var(--cv2-radius-pill);
    background: var(--cv2-gold-dim);
    border: 1px solid rgba(212,168,83,0.25);
    color: var(--cv2-gold);
    font-family: var(--cv2-font-body);
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 200ms var(--cv2-ease);
}
.comms-v2-compose-btn:hover {
    background: rgba(212,168,83,0.25);
    box-shadow: 0 4px 16px var(--cv2-gold-glow);
}
.comms-v2-compose-btn svg {
    width: 14px;
    height: 14px;
}

/* ── Body Grid ── */
.comms-v2-body {
    display: grid;
    grid-template-columns: 200px 1fr;
    min-height: calc(100vh - 120px);
    position: relative;
}

/* ── Streams Sidebar ── */
.comms-v2-sidebar {
    padding: 16px 12px;
    border-right: 1px solid rgba(255,255,255,0.03);
    background: rgba(255,255,255,0.01);
    backdrop-filter: blur(8px);
    display: flex;
    flex-direction: column;
    gap: 4px;
    overflow-y: auto;
}
.comms-v2-sidebar-label {
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--cv2-text-muted);
    padding: 12px 10px 6px;
}
.comms-v2-stream {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 10px;
    border-radius: var(--cv2-radius-sm);
    cursor: pointer;
    transition: all 200ms var(--cv2-ease);
    position: relative;
}
.comms-v2-stream:hover {
    background: var(--cv2-surface-hover);
}
.comms-v2-stream.active {
    background: rgba(212,168,83,0.06);
    border: 1px solid var(--cv2-border-glass);
    box-shadow: inset 0 0 12px rgba(212,168,83,0.04);
}
.comms-v2-stream-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
    position: relative;
}
.comms-v2-stream-dot::after {
    content: '';
    position: absolute;
    inset: -4px;
    border-radius: 50%;
    opacity: 0;
    transition: opacity 300ms;
}
.comms-v2-stream.active .comms-v2-stream-dot::after {
    opacity: 1;
}

/* Stream dot colors */
.comms-v2-stream[data-stream="active"] .comms-v2-stream-dot {
    background: var(--cv2-gold);
    box-shadow: 0 0 8px rgba(212,168,83,0.4);
}
.comms-v2-stream[data-stream="active"].active .comms-v2-stream-dot {
    animation: cv2-breathe 3s ease-in-out infinite;
}
.comms-v2-stream[data-stream="active"] .comms-v2-stream-dot::after {
    background: radial-gradient(circle, rgba(212,168,83,0.3) 0%, transparent 70%);
}

.comms-v2-stream[data-stream="followup"] .comms-v2-stream-dot {
    background: var(--cv2-blue);
    box-shadow: 0 0 8px rgba(59,130,246,0.3);
}
.comms-v2-stream[data-stream="followup"] .comms-v2-stream-dot::after {
    background: radial-gradient(circle, rgba(59,130,246,0.3) 0%, transparent 70%);
}

.comms-v2-stream[data-stream="scheduled"] .comms-v2-stream-dot {
    background: var(--cv2-amber);
    box-shadow: 0 0 6px rgba(245,158,11,0.25);
}
.comms-v2-stream[data-stream="scheduled"] .comms-v2-stream-dot::after {
    background: radial-gradient(circle, rgba(245,158,11,0.2) 0%, transparent 70%);
}

.comms-v2-stream[data-stream="filed"] .comms-v2-stream-dot {
    background: #475569;
    box-shadow: none;
}

.comms-v2-stream-label {
    font-size: 13px;
    font-weight: 500;
    color: var(--cv2-text-secondary);
    flex: 1;
    transition: color 200ms;
}
.comms-v2-stream.active .comms-v2-stream-label {
    color: var(--cv2-text-primary);
}
.comms-v2-stream:hover .comms-v2-stream-label {
    color: var(--cv2-text-primary);
}
.comms-v2-stream-count {
    font-family: 'JetBrains Mono', var(--cv2-font-mono), monospace;
    font-size: 11px;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    color: var(--cv2-text-muted);
    min-width: 20px;
    text-align: right;
    transition: color 200ms;
}
.comms-v2-stream.active .comms-v2-stream-count {
    color: var(--cv2-text-secondary);
}

/* Accounts section */
.comms-v2-accounts-divider {
    height: 1px;
    background: linear-gradient(90deg, transparent 5%, rgba(255,255,255,0.06) 50%, transparent 95%);
    margin: 12px 10px;
}
.comms-v2-account {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 10px;
    border-radius: var(--cv2-radius-sm);
    cursor: pointer;
    transition: all 200ms var(--cv2-ease);
    font-size: 12px;
    color: var(--cv2-text-muted);
}
.comms-v2-account:hover {
    background: var(--cv2-surface-hover);
    color: var(--cv2-text-secondary);
}
.comms-v2-account.active {
    color: var(--cv2-text-primary);
}
.comms-v2-account-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    flex-shrink: 0;
}

/* ── Conversation Feed ── */
.comms-v2-feed {
    padding: 16px 20px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    overflow-y: auto;
    max-height: calc(100vh - 120px);
}
.comms-v2-feed::-webkit-scrollbar {
    width: 4px;
}
.comms-v2-feed::-webkit-scrollbar-track {
    background: transparent;
}
.comms-v2-feed::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.06);
    border-radius: 2px;
}

/* Date group separator */
.comms-v2-date-group {
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: rgba(255,255,255,0.3);
    padding: 16px 4px 6px;
    font-family: 'JetBrains Mono', var(--cv2-font-mono), monospace;
    display: flex;
    align-items: center;
    gap: 12px;
}
.comms-v2-date-group::after {
    content: '';
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, rgba(255,255,255,0.08), transparent 80%);
}

/* ── Conversation Cards ── */
.comms-v2-card {
    background: rgba(255,255,255,0.02);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 10px;
    padding: 14px 16px;
    cursor: pointer;
    transition: all 300ms var(--cv2-spring);
    position: relative;
    animation: cv2-cardIn 300ms var(--cv2-ease) both;
    border-left: 3px solid transparent;
    backdrop-filter: blur(12px);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.05);
}
.comms-v2-card:hover {
    background: linear-gradient(135deg, rgba(255,255,255,0.04), rgba(255,255,255,0.01));
    border-color: rgba(212,168,83,0.15);
    transform: translateY(-1px);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.05), 0 4px 24px var(--cv2-gold-glow);
}
.comms-v2-card.expanded {
    background: var(--cv2-surface-expanded);
    border-color: rgba(212,168,83,0.2);
    box-shadow: 0 8px 32px rgba(212,168,83,0.12);
    transform: none;
    cursor: default;
}

/* Priority left border — use pseudo-element for rounded ends */
.comms-v2-card {
    border-left-color: transparent !important;
}
.comms-v2-card::before {
    content: '';
    position: absolute;
    left: -1px;
    top: 8px;
    bottom: 8px;
    width: 3px;
    border-radius: 3px;
    background: transparent;
    transition: background 200ms ease-out;
}
.comms-v2-card[data-priority="active"]::before {
    background: var(--cv2-gold);
}
.comms-v2-card[data-priority="followup"]::before {
    background: var(--cv2-blue);
}
.comms-v2-card[data-priority="scheduled"]::before {
    background: var(--cv2-amber);
}
.comms-v2-card[data-priority="filed"]::before {
    background: #334155;
}

/* Card layout */
.comms-v2-card-top {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 4px;
}
.comms-v2-card-org {
    font-size: 15px;
    font-weight: 600;
    color: var(--cv2-text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex: 1;
}
.comms-v2-card-time {
    font-family: 'JetBrains Mono', var(--cv2-font-mono), monospace;
    font-size: 11px;
    color: rgba(255,255,255,0.35);
    white-space: nowrap;
    flex-shrink: 0;
}
.comms-v2-card-subject {
    font-size: 12px;
    color: var(--cv2-text-secondary);
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.comms-v2-card-preview {
    font-size: 12px;
    color: var(--cv2-text-muted);
    line-height: 1.5;
    max-height: 3em;
    overflow: hidden;
    margin-bottom: 8px;
    position: relative;
    -webkit-mask-image: linear-gradient(to bottom, #000 60%, transparent 100%);
    mask-image: linear-gradient(to bottom, #000 60%, transparent 100%);
}
.comms-v2-card-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

/* Sentiment dot */
.comms-v2-sentiment {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    position: absolute;
    top: 14px;
    right: 16px;
}
.comms-v2-sentiment[data-sentiment="positive"] {
    background: var(--cv2-green);
    box-shadow: 0 0 6px rgba(34,197,94,0.4);
}
.comms-v2-sentiment[data-sentiment="neutral"] {
    background: var(--cv2-amber);
    box-shadow: 0 0 4px rgba(245,158,11,0.3);
}
.comms-v2-sentiment[data-sentiment="negative"] {
    background: var(--cv2-red);
    box-shadow: 0 0 6px rgba(239,68,68,0.4);
}

/* Thread count badge */
.comms-v2-thread-count {
    font-family: var(--cv2-font-mono);
    font-size: 10px;
    font-weight: 600;
    color: var(--cv2-text-muted);
    background: rgba(255,255,255,0.04);
    padding: 2px 6px;
    border-radius: 4px;
}

/* Category badge */
.comms-v2-category-badge {
    font-size: 10px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.comms-v2-category-badge[data-cat="proposal_response"] {
    color: var(--cv2-gold);
    background: rgba(212,168,83,0.1);
}
.comms-v2-category-badge[data-cat="inquiry"] {
    color: var(--cv2-blue);
    background: rgba(59,130,246,0.1);
}
.comms-v2-category-badge[data-cat="partnership_interest"] {
    color: var(--cv2-green);
    background: rgba(34,197,94,0.1);
}
.comms-v2-category-badge[data-cat="press_request"] {
    color: #a78bfa;
    background: rgba(167,139,250,0.1);
}
.comms-v2-category-badge[data-cat="meeting_request"] {
    color: var(--cv2-amber);
    background: rgba(245,158,11,0.1);
}

/* ── Quick Action Pills ── */
.comms-v2-actions {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}
.comms-v2-action {
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 16px;
    backdrop-filter: blur(4px);
    padding: 4px 12px;
    font-family: var(--cv2-font-body);
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.02em;
    color: var(--cv2-text-secondary);
    cursor: pointer;
    transition: all 150ms ease-out;
    white-space: nowrap;
}
.comms-v2-action:hover {
    background: rgba(212,168,83,0.12);
    border-color: rgba(212,168,83,0.25);
    color: #D4A853;
}

/* ── Expanded Card Thread ── */
.comms-v2-expanded-body {
    animation: cv2-slideDown 300ms var(--cv2-ease) both;
    border-top: 1px solid rgba(255,255,255,0.04);
    margin-top: 12px;
    padding-top: 12px;
    overflow: hidden;
}
.comms-v2-thread-msg {
    padding: 10px 0;
    border-bottom: 1px solid rgba(255,255,255,0.03);
}
.comms-v2-thread-msg:last-child {
    border-bottom: none;
}
.comms-v2-thread-sender {
    font-size: 12px;
    font-weight: 600;
    color: var(--cv2-text-primary);
    margin-bottom: 4px;
}
.comms-v2-thread-time {
    font-family: var(--cv2-font-mono);
    font-size: 10px;
    color: var(--cv2-text-muted);
    margin-left: 8px;
    font-weight: 400;
}
.comms-v2-thread-body {
    font-size: 13px;
    color: var(--cv2-text-secondary);
    line-height: 1.6;
    white-space: pre-wrap;
    word-break: break-word;
}

/* ── Context Panel (slides in from right) ── */
.comms-v2-context {
    position: absolute;
    top: 0;
    right: 0;
    width: 300px;
    height: 100%;
    background: rgba(7,11,18,0.95);
    backdrop-filter: blur(16px);
    border-left: 1px solid rgba(255,255,255,0.04);
    padding: 20px 16px;
    z-index: 20;
    animation: cv2-glideIn 200ms var(--cv2-ease) both;
    overflow-y: auto;
    display: none;
}
.comms-v2-context.visible {
    display: block;
}
.comms-v2-context-title {
    font-size: 15px;
    font-weight: 700;
    color: var(--cv2-text-primary);
    margin-bottom: 4px;
}
.comms-v2-context-subtitle {
    font-size: 11px;
    color: var(--cv2-text-muted);
    margin-bottom: 16px;
}
.comms-v2-context-section {
    margin-bottom: 14px;
}
.comms-v2-context-label {
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--cv2-text-muted);
    margin-bottom: 6px;
}
.comms-v2-context-value {
    font-size: 13px;
    color: var(--cv2-text-secondary);
}
.comms-v2-context-stage {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 3px 10px;
    border-radius: var(--cv2-radius-pill);
    font-size: 11px;
    font-weight: 600;
    background: var(--cv2-gold-dim);
    color: var(--cv2-gold);
}
.comms-v2-context-links {
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.comms-v2-context-link {
    font-size: 12px;
    color: var(--cv2-blue);
    cursor: pointer;
    padding: 4px 0;
    transition: color 150ms;
}
.comms-v2-context-link:hover {
    color: #60a5fa;
}

/* ── Loading state ── */
.comms-v2-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    gap: 16px;
    color: var(--cv2-text-muted);
    font-size: 13px;
}
.comms-v2-loading-orb {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: radial-gradient(circle at 35% 35%, var(--cv2-gold-dim), transparent);
    border: 2px solid rgba(212,168,83,0.2);
    animation: cv2-breathe 2s ease-in-out infinite;
}

/* ── Empty state ── */
.comms-v2-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 80px 20px;
    color: var(--cv2-text-muted);
    font-size: 14px;
    text-align: center;
    gap: 12px;
}
.comms-v2-empty-icon {
    font-size: 36px;
    opacity: 0.4;
}

/* ── Unread highlight ── */
.comms-v2-card.unread .comms-v2-card-org {
    color: #fff;
}
.comms-v2-card.unread .comms-v2-card-subject {
    color: var(--cv2-text-primary);
    font-weight: 500;
}
.comms-v2-card.unread::before {
    background: var(--cv2-gold);
}

/* ── Search bar in feed ── */
.comms-v2-search {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 14px;
    background: rgba(255,255,255,0.02);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: var(--cv2-radius);
    margin-bottom: 12px;
    transition: all 200ms ease-out;
    backdrop-filter: blur(12px);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.03);
}
.comms-v2-search:focus-within {
    border-color: rgba(212,168,83,0.2);
    background: rgba(255,255,255,0.03);
}
.comms-v2-search-icon {
    color: var(--cv2-text-muted);
    flex-shrink: 0;
    width: 16px;
    height: 16px;
    opacity: 0.3;
}
.comms-v2-search input {
    background: transparent;
    border: none;
    outline: none;
    color: var(--cv2-text-primary);
    font-family: var(--cv2-font-body);
    font-size: 13px;
    width: 100%;
}
.comms-v2-search input::placeholder {
    color: rgba(255,255,255,0.25);
}

/* ── Card stagger animation ── */
.comms-v2-card:nth-child(1) { animation-delay: 0ms; }
.comms-v2-card:nth-child(2) { animation-delay: 50ms; }
.comms-v2-card:nth-child(3) { animation-delay: 100ms; }
.comms-v2-card:nth-child(4) { animation-delay: 150ms; }
.comms-v2-card:nth-child(5) { animation-delay: 200ms; }
.comms-v2-card:nth-child(6) { animation-delay: 250ms; }
.comms-v2-card:nth-child(7) { animation-delay: 300ms; }
.comms-v2-card:nth-child(8) { animation-delay: 350ms; }
.comms-v2-card:nth-child(9) { animation-delay: 400ms; }
.comms-v2-card:nth-child(10) { animation-delay: 450ms; }
.comms-v2-card:nth-child(11) { animation-delay: 500ms; }
.comms-v2-card:nth-child(12) { animation-delay: 550ms; }

/* ═══════════════════════════════════════════════════════════════════════════════
   VISUAL MAILROOM — Immersive spatial communications view
   ═══════════════════════════════════════════════════════════════════════════════ */

.mailroom-container {
    position: relative;
    width: 100%;
    height: 100%;
    min-height: 700px;
    background: radial-gradient(ellipse at 50% 90%, #0c1524 0%, #070b12 50%, #040608 100%);
    overflow: hidden;
    font-family: 'DM Sans', -apple-system, sans-serif;
}

/* Atmospheric background layers */
.mailroom-atmosphere {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 0;
}
.mailroom-atmosphere::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at 30% 20%, rgba(96, 165, 250, 0.03) 0%, transparent 50%);
}
.mailroom-atmosphere::after {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at 70% 30%, rgba(236, 72, 153, 0.025) 0%, transparent 50%);
}
.mailroom-atmo-intake {
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at 50% 95%, rgba(212, 168, 83, 0.06) 0%, transparent 35%);
}

/* Canvas for tube/letter animations */
.mailroom-canvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    pointer-events: none;
}

/* Header bar */
.mailroom-header {
    position: relative;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 28px;
}
.mailroom-header-title {
    font-size: 19px;
    font-weight: 700;
    background: linear-gradient(135deg, #D4A853, #f0c674, #D4A853);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}
.mailroom-header-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}
.mailroom-header-btn {
    width: 38px;
    height: 38px;
    border-radius: 12px;
    background: rgba(255,255,255,0.03);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #556677;
    font-size: 16px;
    transition: all 0.3s;
    border: none;
}
.mailroom-header-btn:hover {
    background: rgba(212,168,83,0.08);
    color: #D4A853;
}
.mailroom-header-btn svg {
    width: 16px;
    height: 16px;
}

/* Mailbox grid layout */
.mailroom-grid {
    position: relative;
    z-index: 5;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: flex-start;
    gap: 24px 40px;
    padding: 60px 40px 40px;
    max-width: 900px;
    margin: 0 auto;
}

/* Individual mailbox */
.mailroom-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    transition: all 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
    position: relative;
    min-width: 120px;
}
.mailroom-box:hover {
    transform: scale(1.08);
}
.mailroom-box:hover .mailroom-box-icon {
    box-shadow: var(--box-glow-hover);
}

/* University + Student Press group */
.mailroom-box-group {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}
.mailroom-sub-connector {
    width: 1px;
    height: 16px;
    border-left: 1px dashed;
    opacity: 0.4;
}

/* Small mailbox (Student Press under University) */
.mailroom-box-small {
    min-width: 80px;
    gap: 6px;
}
.mailroom-box-small .mailroom-box-icon {
    width: 44px;
    height: 44px;
}
.mailroom-box-small .mailroom-box-icon svg {
    width: 20px;
    height: 20px;
}
.mailroom-box-small .mailroom-box-label {
    font-size: 9px;
}
.mailroom-box-small .mailroom-box-glow {
    width: 80px;
    height: 80px;
    top: -16px;
    left: 50%;
    transform: translateX(-50%);
}
.mailroom-box-small .mailroom-badges {
    gap: 3px;
}
.mailroom-box-small .mailroom-badge {
    font-size: 8px;
    padding: 1px 5px;
}

/* Mailbox icon container */
.mailroom-box-glow {
    position: absolute;
    width: 140px;
    height: 140px;
    top: -25px;
    left: 50%;
    transform: translateX(-50%);
    border-radius: 50%;
    pointer-events: none;
    transition: all 0.6s ease;
}
.mailroom-box-icon {
    width: 80px;
    height: 80px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    transition: all 0.5s ease;
    background: rgba(15, 23, 42, 0.8);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255,255,255,0.06);
}
.mailroom-box-icon svg {
    width: 36px;
    height: 36px;
    transition: all 0.3s ease;
}

/* Mailbox label */
.mailroom-box-label {
    font-size: 13px;
    font-weight: 600;
    color: #94a3b8;
    letter-spacing: 0.04em;
    text-align: center;
    transition: color 0.3s;
}
.mailroom-box:hover .mailroom-box-label {
    color: #e2e8f0;
}

/* Badges row */
.mailroom-badges {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    justify-content: center;
}
.mailroom-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 10px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 700;
    font-family: 'JetBrains Mono', monospace;
    letter-spacing: 0.02em;
    transition: all 0.3s;
}
.mailroom-badge-new {
    background: rgba(212, 168, 83, 0.12);
    color: #D4A853;
    border: 1px solid rgba(212, 168, 83, 0.25);
}
.mailroom-badge-new.has-items {
    animation: mailroom-badge-pulse 2s ease-in-out infinite;
}
.mailroom-badge-responded {
    background: rgba(34, 197, 94, 0.1);
    color: #22c55e;
    border: 1px solid rgba(34, 197, 94, 0.2);
}
.mailroom-badge-waiting {
    background: rgba(96, 165, 250, 0.1);
    color: #60a5fa;
    border: 1px solid rgba(96, 165, 250, 0.2);
}
.mailroom-badge-scheduled {
    background: rgba(148, 163, 184, 0.08);
    color: #94a3b8;
    border: 1px solid rgba(148, 163, 184, 0.15);
}
.mailroom-badge svg {
    width: 10px;
    height: 10px;
}

/* Flag indicator */
.mailroom-flag {
    position: absolute;
    top: -8px;
    right: -4px;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    z-index: 3;
    transform: scale(0);
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
.mailroom-flag.active {
    transform: scale(1);
    animation: mailroom-flag-pop 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
.mailroom-flag-red {
    background: #ef4444;
    box-shadow: 0 2px 8px rgba(239, 68, 68, 0.5);
    color: #fff;
}
.mailroom-flag-green {
    background: #22c55e;
    box-shadow: 0 2px 8px rgba(34, 197, 94, 0.5);
    color: #fff;
}

/* Intake point (bottom center) */
.mailroom-intake {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 5;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}
.mailroom-intake-orb {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: radial-gradient(circle at 40% 35%, #1e293b, #0f172a);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 20px rgba(0,0,0,0.4), 0 0 40px rgba(212, 168, 83, 0.15);
    position: relative;
}
.mailroom-intake-orb::before {
    content: '';
    position: absolute;
    inset: -20px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(212, 168, 83, 0.15) 0%, rgba(212, 168, 83, 0.03) 50%, transparent 70%);
    animation: mailroom-breathe 3s ease-in-out infinite;
}
.mailroom-intake-orb svg {
    width: 20px;
    height: 20px;
    color: #D4A853;
    opacity: 0.7;
}
.mailroom-intake-label {
    font-size: 10px;
    font-weight: 600;
    color: #475569;
    letter-spacing: 0.15em;
    text-transform: uppercase;
}

/* Total stats bar */
.mailroom-stats-bar {
    position: relative;
    z-index: 5;
    display: flex;
    justify-content: center;
    gap: 32px;
    padding: 16px 28px;
    margin-top: auto;
    margin-bottom: 80px;
}
.mailroom-stat {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: #64748b;
    font-family: 'JetBrains Mono', monospace;
}
.mailroom-stat-value {
    font-weight: 700;
    font-size: 15px;
}

/* ── Access Key Request Section ── */
.mailroom-access-section {
    text-align: center;
    padding: 24px 20px;
    border-top: 1px solid rgba(255,255,255,0.04);
    margin-top: 16px;
}
.mailroom-access-title {
    font-size: 14px;
    font-weight: 600;
    color: rgba(255,255,255,0.7);
    margin-bottom: 4px;
}
.mailroom-access-subtitle {
    font-size: 11px;
    color: rgba(255,255,255,0.35);
    margin-bottom: 16px;
}
.mailroom-access-form {
    display: flex;
    gap: 8px;
    max-width: 600px;
    margin: 0 auto;
    flex-wrap: wrap;
    justify-content: center;
}
.mailroom-access-input {
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 8px;
    padding: 8px 14px;
    color: var(--cv2-text-primary, #e2e8f0);
    font-size: 12px;
    font-family: 'DM Sans', sans-serif;
    flex: 1;
    min-width: 140px;
    transition: all 200ms ease-out;
    backdrop-filter: blur(4px);
}
.mailroom-access-input:focus {
    outline: none;
    border-color: rgba(212,168,83,0.3);
    background: rgba(255,255,255,0.06);
    box-shadow: 0 0 12px rgba(212,168,83,0.1);
}
.mailroom-access-input::placeholder {
    color: rgba(255,255,255,0.25);
}
.mailroom-access-btn {
    background: linear-gradient(135deg, #D4A853, #c49a48);
    color: #0a0a0f;
    border: none;
    border-radius: 8px;
    padding: 8px 20px;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    transition: all 200ms ease-out;
    font-family: 'DM Sans', sans-serif;
    letter-spacing: 0.02em;
}
.mailroom-access-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(212,168,83,0.3);
}

/* ── Mailroom overlay (filtered conversation view) ── */
.mailroom-overlay {
    position: fixed;
    inset: 0;
    z-index: 1000;
    background: rgba(4, 6, 8, 0.85);
    backdrop-filter: blur(20px);
    display: flex;
    flex-direction: column;
    opacity: 0;
    transform: scale(0.97);
    transition: all 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
    pointer-events: none;
}
.mailroom-overlay.visible {
    opacity: 1;
    transform: scale(1);
    pointer-events: all;
}
.mailroom-overlay-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 28px;
    border-bottom: 1px solid rgba(255,255,255,0.04);
}
.mailroom-overlay-title {
    font-size: 18px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 12px;
}
.mailroom-overlay-title svg {
    width: 24px;
    height: 24px;
}
.mailroom-overlay-close {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: rgba(255,255,255,0.04);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #556677;
    font-size: 20px;
    transition: all 0.3s;
    border: none;
}
.mailroom-overlay-close:hover {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
}
.mailroom-overlay-body {
    flex: 1;
    overflow-y: auto;
    padding: 20px 28px;
}
.mailroom-overlay-body::-webkit-scrollbar { width: 4px; }
.mailroom-overlay-body::-webkit-scrollbar-track { background: transparent; }
.mailroom-overlay-body::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.06); border-radius: 2px; }

/* Email cards inside overlay */
.mailroom-email-card {
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255,255,255,0.04);
    border-radius: 16px;
    padding: 16px 20px;
    margin-bottom: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    animation: mailroom-card-in 0.4s ease both;
}
.mailroom-email-card:hover {
    background: rgba(15, 23, 42, 0.85);
    border-color: rgba(255,255,255,0.08);
    transform: translateX(4px);
}
.mailroom-email-card-from {
    font-size: 14px;
    font-weight: 600;
    color: #e2e8f0;
    margin-bottom: 4px;
}
.mailroom-email-card-subject {
    font-size: 13px;
    color: #94a3b8;
    margin-bottom: 6px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.mailroom-email-card-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 11px;
    color: #475569;
}
.mailroom-email-card-meta .unread-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #D4A853;
}
.mailroom-email-card-org {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 8px;
    border-radius: 6px;
    font-size: 10px;
    font-weight: 600;
}

/* ── Animations ── */
@keyframes mailroom-breathe {
    0%, 100% { transform: scale(1); opacity: 0.7; }
    50% { transform: scale(1.15); opacity: 1; }
}
@keyframes mailroom-badge-pulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(212, 168, 83, 0.3); }
    50% { box-shadow: 0 0 0 6px rgba(212, 168, 83, 0); }
}
@keyframes mailroom-flag-pop {
    0% { transform: scale(0); }
    70% { transform: scale(1.3); }
    100% { transform: scale(1); }
}
@keyframes mailroom-card-in {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: translateY(0); }
}
@keyframes mailroom-fade-up {
    from { opacity: 0; transform: translateY(18px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Staggered card animation */
.mailroom-email-card:nth-child(1) { animation-delay: 0ms; }
.mailroom-email-card:nth-child(2) { animation-delay: 40ms; }
.mailroom-email-card:nth-child(3) { animation-delay: 80ms; }
.mailroom-email-card:nth-child(4) { animation-delay: 120ms; }
.mailroom-email-card:nth-child(5) { animation-delay: 160ms; }
.mailroom-email-card:nth-child(6) { animation-delay: 200ms; }
.mailroom-email-card:nth-child(7) { animation-delay: 240ms; }
.mailroom-email-card:nth-child(8) { animation-delay: 280ms; }
.mailroom-email-card:nth-child(9) { animation-delay: 320ms; }
.mailroom-email-card:nth-child(10) { animation-delay: 360ms; }

/* ── Mailroom Triage View ── */
.mailroom-triage-hint {
    font-size: 11px;
    color: #475569;
    background: rgba(255,255,255,0.04);
    padding: 4px 10px;
    border-radius: 6px;
    border: 1px solid rgba(255,255,255,0.06);
}
.mailroom-triage-counts {
    display: flex;
    gap: 10px;
    padding: 12px 28px;
    border-bottom: 1px solid rgba(255,255,255,0.04);
    flex-wrap: wrap;
}
.mailroom-triage-count {
    font-size: 12px;
    font-weight: 600;
    padding: 4px 12px;
    border-radius: 8px;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.06);
    color: #94a3b8;
}
.mailroom-triage-count-reply { color: #60a5fa; border-color: rgba(96,165,250,0.2); background: rgba(96,165,250,0.06); }
.mailroom-triage-count-followup { color: #f59e0b; border-color: rgba(245,158,11,0.2); background: rgba(245,158,11,0.06); }
.mailroom-triage-count-info { color: #94a3b8; border-color: rgba(148,163,184,0.15); }
.mailroom-triage-count-archive { color: #64748b; border-color: rgba(100,116,139,0.15); }

/* Pending drafts section in mailroom triage overlay */
.mailroom-drafts-section { margin: 0 0 16px; padding: 12px; border-radius: 8px; background: rgba(212,168,83,0.04); border: 1px solid rgba(212,168,83,0.12); }
.mailroom-drafts-header { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; color: #D4A853; margin-bottom: 10px; }
.mailroom-draft-card { padding: 8px 12px; margin-bottom: 6px; border-radius: 6px; background: rgba(255,255,255,0.03); border: 1px solid rgba(255,255,255,0.06); cursor: pointer; transition: all 0.15s; }
.mailroom-draft-card:hover { background: rgba(212,168,83,0.08); border-color: rgba(212,168,83,0.2); transform: translateX(2px); }
.mailroom-draft-to { font-size: 13px; font-weight: 600; color: #e2e8f0; margin-bottom: 2px; }
.mailroom-draft-arrow { color: #D4A853; margin-right: 4px; }
.mailroom-draft-subject { font-size: 12px; color: #94a3b8; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 400px; margin-bottom: 4px; }
.mailroom-draft-scores { display: flex; gap: 8px; font-size: 11px; font-family: 'JetBrains Mono', monospace; }
.mailroom-draft-more { text-align: center; font-size: 12px; color: #D4A853; cursor: pointer; padding: 6px; border-radius: 4px; margin-top: 4px; }
.mailroom-draft-more:hover { background: rgba(212,168,83,0.08); }

/* Triage card */
.mailroom-triage-card {
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255,255,255,0.04);
    border-radius: 14px;
    padding: 16px 20px;
    margin-bottom: 10px;
    transition: all 0.3s ease;
    animation: mailroom-card-in 0.4s ease both;
    overflow: hidden;
}
.mailroom-triage-card:hover {
    background: rgba(15, 23, 42, 0.85);
    border-color: rgba(255,255,255,0.08);
}
.mailroom-triage-card.mailroom-card-priority-high {
    border-color: rgba(239, 68, 68, 0.2);
    background: rgba(239, 68, 68, 0.03);
}
.mailroom-triage-card.mailroom-card-priority-low {
    opacity: 0.7;
}

.mailroom-triage-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 4px;
}
.mailroom-triage-from {
    font-size: 14px;
    font-weight: 600;
    color: #e2e8f0;
    display: flex;
    align-items: center;
    gap: 8px;
}
.mailroom-triage-date {
    font-size: 11px;
    color: #475569;
    white-space: nowrap;
}
.mailroom-triage-subject {
    font-size: 13px;
    color: #cbd5e1;
    margin-bottom: 6px;
    font-weight: 500;
}
.mailroom-triage-summary {
    font-size: 12px;
    color: #94a3b8;
    line-height: 1.5;
    padding: 8px 12px;
    background: rgba(255,255,255,0.02);
    border-radius: 8px;
    border-left: 2px solid rgba(212, 168, 83, 0.3);
    margin-bottom: 8px;
}
.mailroom-triage-org-context {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 10px;
}
.mailroom-triage-org-tag {
    font-size: 10px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 6px;
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.06);
    color: #64748b;
    text-transform: capitalize;
}
.mailroom-triage-actions {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    margin-top: 4px;
}
.mailroom-action-btn {
    font-size: 11px;
    font-weight: 600;
    padding: 5px 12px;
    border-radius: 8px;
    border: 1px solid rgba(255,255,255,0.08);
    background: rgba(255,255,255,0.03);
    color: #94a3b8;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 4px;
}
.mailroom-action-btn:hover {
    background: rgba(255,255,255,0.08);
    color: #e2e8f0;
    transform: translateY(-1px);
}
.mailroom-action-key {
    font-size: 9px;
    font-weight: 700;
    width: 16px;
    height: 16px;
    border-radius: 4px;
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.1);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #64748b;
}
.mailroom-action-reply:hover { border-color: rgba(96,165,250,0.4); color: #60a5fa; }
.mailroom-action-followup:hover { border-color: rgba(245,158,11,0.4); color: #f59e0b; }
.mailroom-action-campaign:hover { border-color: rgba(139,92,246,0.4); color: #8b5cf6; }
.mailroom-action-archive:hover { border-color: rgba(100,116,139,0.4); color: #64748b; }
.mailroom-action-dismiss:hover { border-color: rgba(239,68,68,0.3); color: #ef4444; }

.mailroom-triage-suggested {
    font-size: 10px;
    color: #475569;
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid rgba(255,255,255,0.03);
}
.mailroom-triage-suggested strong {
    color: #D4A853;
    text-transform: capitalize;
}

/* Load more */
.mailroom-load-more {
    text-align: center;
    padding: 14px;
    color: #64748b;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    border-radius: 12px;
    border: 1px dashed rgba(255,255,255,0.08);
    margin-top: 8px;
    transition: all 0.2s;
}
.mailroom-load-more:hover {
    background: rgba(255,255,255,0.04);
    color: #94a3b8;
    border-color: rgba(255,255,255,0.15);
}

/* Gmail placeholder */
.mailroom-box-gmail {
    opacity: 0.7;
    border: 1px dashed rgba(66, 133, 244, 0.2) !important;
}
.mailroom-box-gmail:hover {
    opacity: 1;
}
.mailroom-gmail-setup {
    text-align: center;
    max-width: 400px;
    padding: 40px;
}
.mailroom-gmail-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 20px;
}
.mailroom-gmail-icon svg {
    width: 100%;
    height: 100%;
}
.mailroom-gmail-title {
    font-size: 22px;
    font-weight: 700;
    color: #e2e8f0;
    margin-bottom: 12px;
}
.mailroom-gmail-desc {
    font-size: 14px;
    color: #94a3b8;
    line-height: 1.6;
}
.mailroom-gmail-btn {
    margin-top: 24px;
    padding: 12px 28px;
    border-radius: 12px;
    border: 1px solid rgba(66, 133, 244, 0.3);
    background: rgba(66, 133, 244, 0.1);
    color: #4285f4;
    font-size: 14px;
    font-weight: 600;
    cursor: not-allowed;
    opacity: 0.6;
}

/* Staggered triage card animation */
.mailroom-triage-card:nth-child(1) { animation-delay: 0ms; }
.mailroom-triage-card:nth-child(2) { animation-delay: 40ms; }
.mailroom-triage-card:nth-child(3) { animation-delay: 80ms; }
.mailroom-triage-card:nth-child(4) { animation-delay: 120ms; }
.mailroom-triage-card:nth-child(5) { animation-delay: 160ms; }
.mailroom-triage-card:nth-child(6) { animation-delay: 200ms; }
.mailroom-triage-card:nth-child(7) { animation-delay: 240ms; }
.mailroom-triage-card:nth-child(8) { animation-delay: 280ms; }
.mailroom-triage-card:nth-child(9) { animation-delay: 320ms; }
.mailroom-triage-card:nth-child(10) { animation-delay: 360ms; }
