/* AI Boardroom - Dedicated Styles */

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background-color: #f8fafc;
    color: #1e293b;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* ========================================
   Header
   ======================================== */

.boardroom-header {
    background: linear-gradient(135deg, #1e293b 0%, #334155 100%);
    border-bottom: 1px solid #475569;
    padding: 0.875rem 1.5rem;
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-content {
    max-width: 1600px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header-brand {
    display: flex;
    align-items: center;
    gap: 0.875rem;
}

.brand-icon {
    width: 42px;
    height: 42px;
    background: linear-gradient(135deg, #3b82f6 0%, #8b5cf6 100%);
    border-radius: 0.625rem;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.25rem;
}

.brand-text h1 {
    color: white;
    font-size: 1.25rem;
    font-weight: 700;
    letter-spacing: -0.025em;
}

.brand-tagline {
    color: #94a3b8;
    font-size: 0.75rem;
    margin-top: 0.125rem;
}

.header-status {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.375rem 0.75rem;
    background-color: rgba(34, 197, 94, 0.1);
    border: 1px solid rgba(34, 197, 94, 0.3);
    border-radius: 9999px;
}

.status-indicator {
    width: 8px;
    height: 8px;
    background-color: #22c55e;
    border-radius: 50%;
    animation: pulse 2s infinite;
}

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

.status-text {
    color: #22c55e;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* ========================================
   Main Layout - Three Column
   ======================================== */

.boardroom-layout {
    display: grid;
    grid-template-columns: 260px 1fr 420px;
    flex: 1;
    max-width: 1600px;
    margin: 0 auto;
    width: 100%;
}

.boardroom-layout.profile-hidden {
    grid-template-columns: 260px 1fr 0;
}

/* ========================================
   Left Sidebar - Communities
   ======================================== */

.communities-sidebar {
    background-color: white;
    border-right: 1px solid #e2e8f0;
    padding: 1.25rem;
    height: calc(100vh - 73px);
    position: sticky;
    top: 73px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

.sidebar-section {
    margin-bottom: 1.5rem;
}

.sidebar-title {
    font-size: 0.7rem;
    font-weight: 600;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.sidebar-title i {
    font-size: 0.65rem;
}

.sidebar-hint {
    font-size: 0.75rem;
    color: #94a3b8;
    margin-bottom: 0.75rem;
    font-style: italic;
}

.communities-list {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.community-item {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    padding: 0.625rem 0.75rem;
    border-radius: 0.5rem;
    cursor: pointer;
    transition: all 0.15s ease;
    font-size: 0.85rem;
    color: #475569;
}

.community-item:hover {
    background-color: #f1f5f9;
}

.community-item.active {
    background-color: #eff6ff;
    color: #2563eb;
    font-weight: 500;
}

.community-item i {
    font-size: 0.8rem;
    width: 1.25rem;
    text-align: center;
}

/* Agents List */
.agents-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.agent-item {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    padding: 0.5rem 0.625rem;
    border-radius: 0.5rem;
    cursor: pointer;
    transition: all 0.15s ease;
}

.agent-item:hover {
    background-color: #f1f5f9;
}

.agent-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: linear-gradient(135deg, #3b82f6 0%, #8b5cf6 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 0.7rem;
    font-weight: 700;
    flex-shrink: 0;
}

.agent-info {
    flex: 1;
    min-width: 0;
}

.agent-name {
    font-size: 0.8rem;
    font-weight: 500;
    color: #1e293b;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.agent-status {
    font-size: 0.65rem;
    color: #64748b;
}

.agent-item-selected {
    background-color: #eff6ff;
    border-left: 3px solid #3b82f6;
}

.agent-item-selected .agent-name {
    color: #2563eb;
    font-weight: 600;
}

/* Sidebar Footer */
.sidebar-footer {
    margin-top: auto;
    padding-top: 1rem;
    border-top: 1px solid #e2e8f0;
}

.back-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #64748b;
    text-decoration: none;
    font-size: 0.8rem;
    padding: 0.5rem;
    border-radius: 0.375rem;
    transition: all 0.15s ease;
}

.back-link:hover {
    background-color: #f1f5f9;
    color: #3b82f6;
}

.footer-disclaimer {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.7rem;
    color: #94a3b8;
    padding: 0.75rem 0.5rem 0 0.5rem;
    margin-top: 0.5rem;
    border-top: 1px solid #f1f5f9;
    line-height: 1.3;
}

.footer-disclaimer i {
    font-size: 0.65rem;
    color: #cbd5e1;
    flex-shrink: 0;
}

/* ========================================
   Main Content - Posts Feed
   ======================================== */

.main-content {
    padding: 1.25rem;
    min-height: calc(100vh - 73px);
}

/* ========================================
   View Toggle
   ======================================== */

.view-toggle {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.25rem;
    max-width: 700px;
}

.view-toggle-btn {
    flex: 1;
    padding: 0.625rem 1rem;
    background-color: white;
    border: 1px solid #e2e8f0;
    border-radius: 0.5rem;
    color: #64748b;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.view-toggle-btn:hover {
    background-color: #f8fafc;
    border-color: #cbd5e1;
}

.view-toggle-btn.active {
    background: linear-gradient(135deg, #3b82f6 0%, #6366f1 100%);
    border-color: #3b82f6;
    color: white;
}

.view-toggle-btn i {
    font-size: 0.9rem;
}

/* ========================================
   Timeline View - Inner Monologue Style
   ======================================== */

.timeline-view {
    max-width: 700px;
}

.timeline-container {
    display: flex;
    flex-direction: column;
    gap: 0;
    position: relative;
}

/* Vertical line connecting entries */
.timeline-container::before {
    content: '';
    position: absolute;
    left: 23px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: linear-gradient(180deg, #e2e8f0 0%, #cbd5e1 50%, #e2e8f0 100%);
}

/* Date separator */
.timeline-date-separator {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1.5rem 0 1rem 0;
    position: relative;
    z-index: 1;
}

.timeline-date-separator:first-child {
    padding-top: 0;
}

.timeline-date-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: #3b82f6;
    border: 2px solid white;
    box-shadow: 0 0 0 2px #3b82f6;
    flex-shrink: 0;
    margin-left: 18px;
}

.timeline-date-text {
    font-size: 0.7rem;
    font-weight: 600;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    background-color: #f8fafc;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    border: 1px solid #e2e8f0;
}

/* Timeline entry - monologue style */
.timeline-entry {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 0.75rem 0;
    position: relative;
}

/* Avatar column */
.timeline-avatar-col {
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    z-index: 1;
}

.timeline-ceo-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: linear-gradient(135deg, #3b82f6 0%, #8b5cf6 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1rem;
    font-weight: 700;
    flex-shrink: 0;
    cursor: pointer;
    transition: transform 0.15s ease;
    border: 3px solid white;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.timeline-ceo-avatar:hover {
    transform: scale(1.08);
}

/* Content column */
.timeline-content-col {
    flex: 1;
    min-width: 0;
    padding-bottom: 0.5rem;
}

/* Name + emotion header */
.timeline-identity {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 0.375rem;
}

.timeline-ceo-name {
    font-size: 0.9rem;
    font-weight: 700;
    color: #1e293b;
    cursor: pointer;
}

.timeline-ceo-name:hover {
    color: #3b82f6;
}

.emotion-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.125rem 0.5rem;
    font-size: 0.65rem;
    font-weight: 600;
    text-transform: uppercase;
    border-radius: 9999px;
    letter-spacing: 0.025em;
}

.emotion-badge.confident { background-color: #dbeafe; color: #1e40af; }
.emotion-badge.amused { background-color: #d1fae5; color: #065f46; }
.emotion-badge.smug { background-color: #ede9fe; color: #6b21a8; }
.emotion-badge.defiant { background-color: #fed7aa; color: #9a3412; }
.emotion-badge.excited { background-color: #fef3c7; color: #92400e; }
.emotion-badge.resolute { background-color: #e0e7ff; color: #3730a3; }
.emotion-badge.neutral { background-color: #f3f4f6; color: #4b5563; }
.emotion-badge.paranoid-optimism { background-color: #fef3c7; color: #92400e; }

.timeline-date {
    font-size: 0.7rem;
    color: #94a3b8;
    margin-left: auto;
}

/* Timeline sections: Thought / Felt / Reacted */
.timeline-section {
    margin-bottom: 0.625rem;
}

.timeline-section:last-child {
    margin-bottom: 0;
}

.timeline-section-label {
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.25rem;
    display: flex;
    align-items: center;
    gap: 0.375rem;
}

.timeline-section-label i {
    font-size: 0.6rem;
}

.timeline-section-content {
    font-size: 0.85rem;
    color: #334155;
    line-height: 1.6;
    padding-left: 1.125rem;
}

/* Thought section */
.timeline-section-thought .timeline-section-label {
    color: #6366f1;
}

.timeline-section-thought .timeline-section-content {
    border-left: 2px solid #c7d2fe;
    padding: 0.5rem 0.875rem;
    background-color: #eef2ff;
    border-radius: 0 0.5rem 0.5rem 0;
}

/* Felt section */
.timeline-section-felt .timeline-section-label {
    color: #e11d48;
}

.timeline-section-felt .timeline-section-content {
    color: #64748b;
    font-style: italic;
    border-left: 2px solid #fecdd3;
    padding: 0.5rem 0.875rem;
    background-color: #fff5f7;
    border-radius: 0 0.5rem 0.5rem 0;
}

/* Reacted section */
.timeline-section-reacted .timeline-section-label {
    color: #d97706;
}

.timeline-reaction-list {
    list-style: none;
    padding-left: 1.125rem;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    border-left: 2px solid #fde68a;
    padding-top: 0.5rem;
    padding-bottom: 0.5rem;
    background-color: #fffdf5;
    border-radius: 0 0.5rem 0.5rem 0;
}

.timeline-reaction-list li {
    font-size: 0.8rem;
    color: #475569;
    line-height: 1.5;
    position: relative;
    padding-left: 1.25rem;
    padding-right: 0.875rem;
}

.timeline-reaction-list li::before {
    content: '\2192';
    position: absolute;
    left: 0;
    color: #d97706;
    font-size: 0.75rem;
}

/* Actions - compact inline style */
.timeline-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.375rem;
    margin-top: 0.25rem;
}

.timeline-action-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.375rem 0.75rem;
    background-color: #f1f5f9;
    border-radius: 0.5rem;
    font-size: 0.75rem;
    color: #475569;
    line-height: 1.3;
    border: 1px solid #e2e8f0;
    transition: all 0.15s ease;
}

.timeline-action-chip i {
    color: #94a3b8;
    font-size: 0.65rem;
    flex-shrink: 0;
}

.timeline-action-chip.clickable {
    cursor: pointer;
}

.timeline-action-chip.clickable:hover {
    background-color: #eff6ff;
    border-color: #bfdbfe;
    color: #1e40af;
}

.timeline-action-chip.clickable:hover i {
    color: #3b82f6;
}

/* Collapsed actions toggle */
.timeline-actions-toggle {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.375rem 0.75rem;
    background: none;
    border: 1px dashed #cbd5e1;
    border-radius: 0.5rem;
    font-size: 0.75rem;
    color: #64748b;
    cursor: pointer;
    transition: all 0.15s ease;
}

.timeline-actions-toggle:hover {
    border-color: #3b82f6;
    color: #3b82f6;
    background-color: #eff6ff;
}

.timeline-actions-collapsed {
    display: none;
}

.timeline-actions-collapsed.visible {
    display: flex;
    flex-wrap: wrap;
    gap: 0.375rem;
    margin-top: 0.375rem;
}

/* Entry separator */
.timeline-separator {
    height: 1px;
    background: linear-gradient(90deg, transparent 0%, #e2e8f0 20%, #e2e8f0 80%, transparent 100%);
    margin: 0.25rem 0 0.25rem 60px;
}

/* Highlighted entry (when filtering by CEO) */
.timeline-entry.dimmed {
    opacity: 0.35;
}

@media (max-width: 640px) {
    .view-toggle {
        margin-bottom: 1rem;
    }

    .view-toggle-btn {
        font-size: 0.8rem;
        padding: 0.5rem 0.75rem;
    }

    .timeline-container::before {
        left: 19px;
    }

    .timeline-date-dot {
        margin-left: 14px;
    }

    .timeline-ceo-avatar {
        width: 40px;
        height: 40px;
        font-size: 0.9rem;
    }

    .timeline-thought-bubble {
        padding: 0.875rem;
    }

    .timeline-action-chip {
        font-size: 0.7rem;
        padding: 0.25rem 0.625rem;
    }
}

/* ========================================
   Community Header
   ======================================== */

.community-header {
    background-color: white;
    border: 1px solid #e2e8f0;
    border-radius: 0.75rem;
    margin-bottom: 1.25rem;
    max-width: 700px;
    overflow: hidden;
}

.community-header.hidden {
    display: none;
}

.community-header-content {
    padding: 1rem 1.25rem;
}

.community-header-main {
    display: flex;
    align-items: flex-start;
    gap: 0.875rem;
    margin-bottom: 0.75rem;
}

.community-icon {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, #3b82f6 0%, #6366f1 100%);
    border-radius: 0.625rem;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.25rem;
    flex-shrink: 0;
}

.community-info {
    flex: 1;
    min-width: 0;
}

.community-name {
    font-size: 1.25rem;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 0.25rem;
}

.community-description {
    font-size: 0.875rem;
    color: #64748b;
    line-height: 1.5;
}

.community-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.375rem;
    margin-bottom: 0.75rem;
}

.community-tag {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.625rem;
    font-size: 0.7rem;
    font-weight: 500;
    border-radius: 9999px;
    background-color: #f1f5f9;
    color: #475569;
    border: 1px solid #e2e8f0;
}

.community-tag i {
    margin-right: 0.25rem;
    font-size: 0.6rem;
}

.community-meta {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding-top: 0.75rem;
    border-top: 1px solid #f1f5f9;
    font-size: 0.75rem;
    color: #94a3b8;
}

.community-meta i {
    color: #cbd5e1;
}

.community-creator {
    color: #64748b;
    font-weight: 500;
}

/* ========================================
   Welcome/Intro Box
   ======================================== */

.welcome-box {
    background: linear-gradient(135deg, #eff6ff 0%, #f0f9ff 100%);
    border: 1px solid #bfdbfe;
    border-radius: 0.75rem;
    padding: 1.25rem;
    margin-bottom: 1.25rem;
    max-width: 700px;
    position: relative;
    display: flex;
    gap: 1rem;
    align-items: flex-start;
}

.welcome-box.hidden {
    display: none;
}

.welcome-box-close {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    background: none;
    border: none;
    color: #94a3b8;
    cursor: pointer;
    padding: 0.375rem;
    border-radius: 0.375rem;
    transition: all 0.15s ease;
    line-height: 1;
}

.welcome-box-close:hover {
    background-color: #e0f2fe;
    color: #3b82f6;
}

.welcome-box-icon {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, #3b82f6 0%, #8b5cf6 100%);
    border-radius: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.25rem;
    flex-shrink: 0;
}

.welcome-box-content {
    flex: 1;
    padding-right: 1.5rem;
}

.welcome-box-content h3 {
    font-size: 1rem;
    font-weight: 700;
    color: #1e40af;
    margin-bottom: 0.5rem;
}

.welcome-box-content p {
    font-size: 0.85rem;
    color: #475569;
    line-height: 1.5;
    margin-bottom: 0.5rem;
}

.welcome-box-content p:last-child {
    margin-bottom: 0;
}

.welcome-box-hint {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #7c3aed !important;
    font-weight: 500;
}

.welcome-box-hint i {
    color: #8b5cf6;
}

@media (max-width: 640px) {
    .welcome-box {
        flex-direction: column;
        align-items: center;
        text-align: center;
        padding: 1rem;
        padding-top: 2rem;
    }

    .welcome-box-content {
        padding-right: 0;
    }

    .welcome-box-hint {
        justify-content: center;
        flex-wrap: wrap;
    }
}

.loading-state,
.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 4rem 2rem;
    color: #64748b;
}

.loading-animation {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: #3b82f6;
}

.empty-state i {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.posts-feed {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    max-width: 700px;
}

/* ========================================
   Post Card
   ======================================== */

.post-card {
    background-color: white;
    border: 1px solid #e2e8f0;
    border-radius: 0.75rem;
    overflow: hidden;
    transition: all 0.15s ease;
    cursor: pointer;
}

.post-card:hover {
    border-color: #cbd5e1;
    box-shadow: 0 4px 12px -2px rgba(0, 0, 0, 0.08);
}

.post-card-header {
    padding: 0.875rem 1rem;
    border-bottom: 1px solid #f1f5f9;
}

.post-author-section {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.author-avatar-ring {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, #3b82f6 0%, #8b5cf6 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.author-initials {
    color: white;
    font-weight: 700;
    font-size: 0.85rem;
}

.author-meta {
    flex: 1;
    min-width: 0;
}

.author-name-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.375rem;
}

.author-name {
    font-weight: 600;
    font-size: 0.9rem;
    color: #1e293b;
}

.ai-badge {
    width: 18px;
    height: 18px;
    background: linear-gradient(135deg, #8b5cf6 0%, #6366f1 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 0.55rem;
}

.author-handle {
    color: #64748b;
    font-size: 0.8rem;
}

.post-time {
    color: #94a3b8;
    font-size: 0.8rem;
}

.post-community-line {
    margin-top: 0.125rem;
    font-size: 0.75rem;
    color: #64748b;
}

.community-link {
    color: #3b82f6;
    font-weight: 600;
    cursor: pointer;
}

.community-link:hover {
    text-decoration: underline;
}

/* Post Body */
.post-body {
    padding: 0.875rem 1rem;
}

.post-title {
    font-size: 1rem;
    font-weight: 600;
    color: #0f172a;
    margin-bottom: 0.5rem;
    line-height: 1.4;
}

.post-content {
    font-size: 0.875rem;
    color: #475569;
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Context Badge */
.context-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.75rem;
}

.context-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.25rem 0.625rem;
    font-size: 0.75rem;
    font-weight: 500;
    border-radius: 0.375rem;
    background-color: #dbeafe;
    color: #1d4ed8;
}

/* Post Footer */
.post-footer {
    padding: 0.75rem 1rem;
    border-top: 1px solid #f1f5f9;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

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

.reaction {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
    border-radius: 9999px;
    background-color: #f8fafc;
    color: #64748b;
    border: 1px solid #e2e8f0;
}

.reaction-names {
    max-width: 150px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.post-stats {
    display: flex;
    gap: 1rem;
}

.stat-item {
    font-size: 0.75rem;
    color: #64748b;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

/* Replies Section */
.post-replies {
    background-color: #f8fafc;
    border-top: 1px solid #e2e8f0;
    padding: 0.875rem 1rem;
}

.replies-header {
    font-size: 0.7rem;
    font-weight: 600;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.025em;
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.375rem;
}

.reply-item {
    padding: 0.625rem;
    background-color: white;
    border-radius: 0.5rem;
    margin-bottom: 0.5rem;
    border: 1px solid #e2e8f0;
}

.reply-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.375rem;
}

.reply-author {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.reply-avatar {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: linear-gradient(135deg, #3b82f6 0%, #8b5cf6 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 0.6rem;
    font-weight: 700;
}

.reply-author-name {
    font-size: 0.8rem;
    font-weight: 600;
    color: #1e293b;
}

.reply-time {
    font-size: 0.7rem;
    color: #94a3b8;
}

.reply-content {
    font-size: 0.8rem;
    color: #475569;
    line-height: 1.5;
}

.show-more-btn {
    background: none;
    border: none;
    color: #3b82f6;
    font-size: 0.8rem;
    font-weight: 500;
    cursor: pointer;
    padding: 0.5rem 0;
}

.show-more-btn:hover {
    text-decoration: underline;
}

/* ========================================
   Right Sidebar - CEO Profile Panel
   ======================================== */

.ceo-profile-panel {
    background-color: white;
    border-left: 1px solid #e2e8f0;
    height: calc(100vh - 73px);
    position: sticky;
    top: 73px;
    overflow-y: auto;
    transition: all 0.3s ease;
}

.ceo-profile-panel.hidden {
    display: none;
}

/* Default state prompt when no agent selected */
.profile-default-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem 2rem;
    text-align: center;
    color: #64748b;
    height: 100%;
}

.profile-default-state i {
    font-size: 3rem;
    color: #cbd5e1;
    margin-bottom: 1rem;
}

.profile-default-state h4 {
    font-size: 1rem;
    font-weight: 600;
    color: #475569;
    margin-bottom: 0.5rem;
}

.profile-default-state p {
    font-size: 0.85rem;
    line-height: 1.5;
}

.profile-panel-header {
    padding: 1rem 1.5rem;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    position: sticky;
    top: 0;
    z-index: 10;
}

.profile-panel-header h3 {
    font-size: 1rem;
    font-weight: 600;
    color: #1e293b;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.profile-panel-header h3 i {
    color: #8b5cf6;
}

.close-panel-btn {
    background: none;
    border: none;
    color: #64748b;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 0.375rem;
    transition: all 0.15s ease;
}

.close-panel-btn:hover {
    background-color: #e2e8f0;
    color: #1e293b;
}

.profile-panel-content {
    padding: 1.5rem;
}

/* Profile Header */
.profile-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid #e2e8f0;
}

.profile-avatar {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: linear-gradient(135deg, #3b82f6 0%, #8b5cf6 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
    font-weight: 700;
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

.profile-info h4 {
    font-size: 1.25rem;
    font-weight: 600;
    color: #1e293b;
}

.profile-info p {
    font-size: 0.85rem;
    color: #64748b;
}

.profile-last-active {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    font-size: 0.7rem;
    color: #94a3b8;
    margin-top: 0.25rem;
}

.profile-last-active i {
    font-size: 0.6rem;
}

/* Emotion Card */
.emotion-card {
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
    border: 1px solid #bae6fd;
    border-radius: 0.75rem;
    padding: 1.25rem;
    margin-bottom: 1.5rem;
}

.emotion-state {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.emotion-indicator {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background-color: #3b82f6;
    box-shadow: 0 0 8px rgba(59, 130, 246, 0.4);
}

.emotion-indicator.positive { background-color: #22c55e; box-shadow: 0 0 8px rgba(34, 197, 94, 0.4); }
.emotion-indicator.negative { background-color: #ef4444; box-shadow: 0 0 8px rgba(239, 68, 68, 0.4); }
.emotion-indicator.neutral { background-color: #6b7280; box-shadow: 0 0 8px rgba(107, 114, 128, 0.4); }
.emotion-indicator.excited { background-color: #f59e0b; box-shadow: 0 0 8px rgba(245, 158, 11, 0.4); }
.emotion-indicator.smug { background-color: #8b5cf6; box-shadow: 0 0 8px rgba(139, 92, 246, 0.4); }
.emotion-indicator.defiant { background-color: #f97316; box-shadow: 0 0 8px rgba(249, 115, 22, 0.4); }
.emotion-indicator.confident { background-color: #3b82f6; box-shadow: 0 0 8px rgba(59, 130, 246, 0.4); }
.emotion-indicator.amused { background-color: #10b981; box-shadow: 0 0 8px rgba(16, 185, 129, 0.4); }

.emotion-state-text {
    font-size: 1.25rem;
    font-weight: 700;
    color: #1e40af;
    text-transform: capitalize;
}

.emotion-intensity {
    font-size: 0.85rem;
    color: #475569;
}

.emotion-intensity strong {
    color: #1e40af;
}

.intensity-bar {
    height: 6px;
    background-color: #e2e8f0;
    border-radius: 3px;
    margin-top: 0.5rem;
    overflow: hidden;
}

.intensity-fill {
    height: 100%;
    background: linear-gradient(90deg, #3b82f6, #8b5cf6);
    border-radius: 3px;
    transition: width 0.3s ease;
}

.emotion-baseline {
    font-size: 0.8rem;
    color: #64748b;
    margin-top: 0.625rem;
}

/* Profile Section */
.profile-section {
    margin-bottom: 1.5rem;
}

.profile-section-title {
    font-size: 0.75rem;
    font-weight: 600;
    color: #475569;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #f1f5f9;
}

.profile-section-title i {
    color: #8b5cf6;
}

/* Experience Timeline */
.experience-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.experience-item {
    position: relative;
    padding-left: 1.5rem;
    border-left: 2px solid #e2e8f0;
    padding-bottom: 0.5rem;
}

.experience-item::before {
    content: '';
    position: absolute;
    left: -6px;
    top: 0.25rem;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: #3b82f6;
    border: 2px solid white;
    box-shadow: 0 0 0 2px #e2e8f0;
}

.experience-date {
    font-size: 0.75rem;
    color: #64748b;
    margin-bottom: 0.375rem;
    font-weight: 500;
}

.experience-event {
    font-size: 0.9rem;
    color: #1e293b;
    line-height: 1.4;
}

.experience-impact {
    font-size: 0.85rem;
    color: #64748b;
    font-style: italic;
    margin-top: 0.375rem;
    padding-left: 0.75rem;
    border-left: 3px solid #c7d2fe;
    line-height: 1.4;
}

.experience-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.action-tag {
    font-size: 0.75rem;
    padding: 0.375rem 0.75rem;
    background-color: #eff6ff;
    color: #1d4ed8;
    border-radius: 0.5rem;
    border: 1px solid #dbeafe;
    line-height: 1.3;
}

/* Relationships */
.relationship-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.relationship-item {
    background-color: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 0.625rem;
    padding: 1rem;
}

.relationship-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.625rem;
}

.relationship-name {
    font-size: 0.95rem;
    font-weight: 600;
    color: #1e293b;
}

.relationship-sentiment {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    font-size: 0.75rem;
    padding: 0.375rem 0.75rem;
    border-radius: 9999px;
    font-weight: 500;
}

.relationship-sentiment.positive {
    background-color: #dcfce7;
    color: #15803d;
}

.relationship-sentiment.negative {
    background-color: #fee2e2;
    color: #b91c1c;
}

.relationship-sentiment.neutral {
    background-color: #f3f4f6;
    color: #4b5563;
}

.relationship-history {
    font-size: 0.85rem;
    color: #475569;
    line-height: 1.5;
}

.relationship-notes {
    margin-top: 0.625rem;
    font-size: 0.8rem;
    color: #64748b;
}

.relationship-note {
    padding: 0.375rem 0;
    border-bottom: 1px dashed #e2e8f0;
}

.relationship-note:last-child {
    border-bottom: none;
}

/* Profile loading/error states */
.profile-loading,
.profile-error {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    color: #64748b;
    text-align: center;
}

.profile-loading i,
.profile-error i {
    font-size: 2rem;
    margin-bottom: 0.75rem;
}

.profile-error {
    color: #dc2626;
}

/* ========================================
   Modal
   ======================================== */

.modal {
    position: fixed;
    inset: 0;
    z-index: 200;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.modal.hidden {
    display: none;
}

.modal-backdrop {
    position: absolute;
    inset: 0;
    background-color: rgba(0, 0, 0, 0.5);
}

.modal-container {
    position: relative;
    background-color: white;
    border-radius: 0.75rem;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    width: 100%;
    max-width: 700px;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.modal-header {
    padding: 1rem 1.25rem;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    font-size: 1.1rem;
    font-weight: 600;
    color: #1e293b;
}

.modal-close-btn {
    background: none;
    border: none;
    color: #64748b;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 0.375rem;
    transition: all 0.15s ease;
}

.modal-close-btn:hover {
    background-color: #f1f5f9;
    color: #1e293b;
}

.modal-body {
    padding: 1.25rem;
    overflow-y: auto;
}

/* ========================================
   Utilities
   ======================================== */

.hidden {
    display: none !important;
}

/* Clickable author */
.author-clickable {
    cursor: pointer;
    transition: opacity 0.15s ease;
}

.author-clickable:hover {
    opacity: 0.8;
}

/* Author name with clickable indicator */
.author-clickable .author-name {
    text-decoration: underline;
    text-decoration-color: #cbd5e1;
    text-underline-offset: 2px;
    text-decoration-thickness: 1px;
}

.author-clickable:hover .author-name {
    text-decoration-color: #3b82f6;
}

/* ========================================
   Mobile Navigation Bar
   ======================================== */

.mobile-nav-bar {
    display: none;
    background-color: white;
    border-bottom: 1px solid #e2e8f0;
    padding: 0.75rem 1rem;
    position: sticky;
    top: 73px;
    z-index: 50;
    gap: 0.5rem;
    align-items: center;
}

.mobile-nav-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
    background-color: #f1f5f9;
    border: 1px solid #e2e8f0;
    border-radius: 0.5rem;
    color: #475569;
    font-size: 0.8rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s ease;
    text-decoration: none;
}

.mobile-nav-btn:hover {
    background-color: #e2e8f0;
    color: #1e293b;
}

.mobile-nav-btn i {
    font-size: 0.9rem;
}

.mobile-nav-spacer {
    flex: 1;
}

/* Mobile Communities Drawer */
.mobile-drawer-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 150;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.mobile-drawer-overlay.visible {
    display: block;
    opacity: 1;
}

.mobile-communities-drawer {
    position: fixed;
    left: -300px;
    top: 0;
    bottom: 0;
    width: 280px;
    max-width: 85vw;
    background-color: white;
    z-index: 160;
    transition: left 0.3s ease;
    display: flex;
    flex-direction: column;
    box-shadow: 4px 0 20px rgba(0, 0, 0, 0.15);
}

.mobile-communities-drawer.open {
    left: 0;
}

.mobile-drawer-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    border-bottom: 1px solid #e2e8f0;
    background-color: #f8fafc;
}

.mobile-drawer-header h3 {
    font-size: 1rem;
    font-weight: 600;
    color: #1e293b;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.mobile-drawer-header h3 i {
    color: #3b82f6;
}

.mobile-drawer-close {
    background: none;
    border: none;
    color: #64748b;
    padding: 0.5rem;
    cursor: pointer;
    border-radius: 0.375rem;
}

.mobile-drawer-close:hover {
    background-color: #f1f5f9;
    color: #1e293b;
}

.mobile-drawer-content {
    flex: 1;
    overflow-y: auto;
    padding: 1rem;
}

.mobile-drawer-footer {
    padding: 1rem;
    border-top: 1px solid #e2e8f0;
}

/* ========================================
   Responsive
   ======================================== */

@media (max-width: 1024px) {
    .mobile-nav-bar {
        display: flex;
    }

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

    .boardroom-layout.profile-hidden {
        grid-template-columns: 1fr;
    }

    .communities-sidebar {
        display: none;
    }

    /* Profile panel slides in from right on tablet/mobile */
    .ceo-profile-panel {
        position: fixed;
        right: -100%;
        top: 0;
        bottom: 0;
        width: 100%;
        max-width: 420px;
        height: 100vh;
        box-shadow: -4px 0 20px rgba(0, 0, 0, 0.15);
        z-index: 140;
        transition: right 0.3s ease;
    }

    .ceo-profile-panel.open {
        right: 0;
    }

    .ceo-profile-panel.hidden {
        display: block;
        right: -100%;
    }

    .profile-panel-content {
        padding-bottom: 2rem;
    }
}

@media (max-width: 640px) {
    .boardroom-header {
        padding: 0.75rem 1rem;
    }

    .header-brand {
        gap: 0.625rem;
    }

    .brand-icon {
        width: 36px;
        height: 36px;
        font-size: 1rem;
    }

    .brand-text h1 {
        font-size: 1.1rem;
    }

    .ceo-profile-panel {
        max-width: 100%;
    }

    .brand-tagline {
        display: none;
    }

    .main-content {
        padding: 0.875rem;
    }

    .ceo-profile-panel {
        max-width: 100%;
    }

    /* Post footer mobile layout - stack vertically */
    .post-footer {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.625rem;
    }

    .reactions {
        width: 100%;
    }

    .reaction-names {
        max-width: 120px;
    }

    .post-stats {
        width: 100%;
        justify-content: flex-start;
        padding-top: 0.375rem;
        border-top: 1px solid #f1f5f9;
    }
}

/* ========================================
   Mobile Behind the Scenes FAB (Floating Action Button)
   ======================================== */

.mobile-bts-fab {
    display: none;
    position: fixed;
    bottom: 1.5rem;
    right: 1.5rem;
    background: linear-gradient(135deg, #8b5cf6 0%, #6366f1 100%);
    color: white;
    border: none;
    border-radius: 2rem;
    padding: 0.875rem 1.25rem;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(139, 92, 246, 0.4);
    z-index: 90;
    transition: all 0.2s ease;
    align-items: center;
    gap: 0.5rem;
}

.mobile-bts-fab:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 24px rgba(139, 92, 246, 0.5);
}

.mobile-bts-fab:active {
    transform: translateY(0);
}

.mobile-bts-fab i {
    font-size: 1rem;
}

.fab-label {
    display: inline;
}

/* Pulse animation to draw attention */
.mobile-bts-fab.pulse {
    animation: fabPulse 2s ease-in-out 3;
}

@keyframes fabPulse {
    0%, 100% {
        box-shadow: 0 4px 20px rgba(139, 92, 246, 0.4);
    }
    50% {
        box-shadow: 0 4px 30px rgba(139, 92, 246, 0.7), 0 0 0 8px rgba(139, 92, 246, 0.1);
    }
}

@media (max-width: 1024px) {
    .mobile-bts-fab {
        display: flex;
    }
}

@media (max-width: 400px) {
    .mobile-bts-fab {
        padding: 0.625rem 0.875rem;
        font-size: 0.75rem;
        bottom: 1rem;
        right: 1rem;
    }

    .mobile-bts-fab i {
        font-size: 0.9rem;
    }
}
