/* SAG Conversational Interface - Scyllus Colors + Orwell Aesthetics */

:root {
    /* Scyllus Colors */
    --bg-primary: #1a1a1a;
    --bg-secondary: #2a2420;
    --bg-tertiary: #1e1e1e;
    --brand-orange: #ffa726;
    --brand-orange-dark: #ff8f00;
    --brand-orange-hover: #ff9800;
    --text-primary: #d4d1c9;
    --text-secondary: #a89d8e;
    --text-tertiary: #6b6256;
    --border-color: rgba(255, 167, 38, 0.2);
    --border-color-light: rgba(255, 167, 38, 0.1);
    --card-bg: rgba(255, 167, 38, 0.05);
}

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

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

.app-container {
    display: flex;
    flex-direction: column;
    height: 100vh;
}

/* Header */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 24px;
    background: rgba(0, 0, 0, 0.3);
    border-bottom: 1px solid var(--border-color);
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo-icon {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--brand-orange) 0%, var(--brand-orange-dark) 100%);
    color: var(--bg-primary);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 16px;
    font-family: 'JetBrains Mono', monospace;
}

.logo-text h1 {
    font-size: 18px;
    font-weight: 600;
    color: var(--brand-orange);
    margin-bottom: 2px;
    letter-spacing: 0.5px;
}

.logo-text p {
    font-size: 12px;
    color: var(--text-tertiary);
    font-family: 'JetBrains Mono', monospace;
}

.company-badge {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    background: rgba(255, 167, 38, 0.1);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    color: var(--text-secondary);
    font-family: 'JetBrains Mono', monospace;
    letter-spacing: 1px;
}

.badge-dot {
    width: 6px;
    height: 6px;
    background: var(--brand-orange);
    border-radius: 50%;
    animation: pulse 2s infinite;
}

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

/* Main Layout */
.main-layout {
    display: flex;
    flex: 1;
    overflow: hidden;
}

/* Chat Section (Left) */
.chat-section {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 16px;
    padding-right: 8px;
    overflow: hidden;
    position: relative;  /* Allow overlay to position relative to this */
}

.chat-container {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--border-color-light);
    border-radius: 4px;
    margin-bottom: 12px;
    scroll-behavior: smooth;
}

.chat-container::-webkit-scrollbar {
    width: 6px;
}

.chat-container::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.2);
}

.chat-container::-webkit-scrollbar-thumb {
    background: var(--brand-orange);
}

/* Messages */
.message {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
    animation: fadeIn 0.2s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

.message-avatar {
    width: 32px;
    height: 32px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    font-weight: 600;
    flex-shrink: 0;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    color: var(--brand-orange);
    font-family: 'JetBrains Mono', monospace;
}

.user-message .message-avatar {
    background: linear-gradient(135deg, var(--brand-orange) 0%, var(--brand-orange-dark) 100%);
    color: var(--bg-primary);
}

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

.message-text {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--border-color-light);
    border-radius: 4px;
    padding: 12px 16px;
    line-height: 1.6;
    font-size: 14px;
}

.user-message .message-text {
    background: rgba(255, 167, 38, 0.08);
    border-color: var(--border-color);
}

.message-text strong {
    color: var(--brand-orange);
    font-weight: 600;
}

.message-text p {
    margin-bottom: 10px;
}

.message-text p:last-child {
    margin-bottom: 0;
}

.message-text ul {
    margin-left: 18px;
    margin-bottom: 10px;
}

.message-text li {
    margin-bottom: 6px;
    color: var(--text-secondary);
}

/* Markdown Headings */
.message-text h1 {
    font-size: 20px;
    font-weight: 700;
    color: var(--brand-orange);
    margin-top: 16px;
    margin-bottom: 12px;
    border-bottom: 2px solid var(--border-color-light);
    padding-bottom: 8px;
}

.message-text h2 {
    font-size: 18px;
    font-weight: 700;
    color: var(--brand-orange);
    margin-top: 14px;
    margin-bottom: 10px;
    border-bottom: 1px solid var(--border-color-light);
    padding-bottom: 6px;
}

.message-text h3 {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    margin-top: 12px;
    margin-bottom: 8px;
}

.message-text h4 {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    margin-top: 10px;
    margin-bottom: 6px;
}

.message-text h1:first-child,
.message-text h2:first-child,
.message-text h3:first-child,
.message-text h4:first-child {
    margin-top: 0;
}

/* Code Blocks */
.message-text code {
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid var(--border-color-light);
    border-radius: 3px;
    padding: 2px 6px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 12px;
    color: var(--brand-orange);
}

.message-text pre {
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid var(--border-color-light);
    border-radius: 6px;
    padding: 12px;
    margin: 12px 0;
    overflow-x: auto;
}

.message-text pre code {
    background: none;
    border: none;
    padding: 0;
    color: var(--text-primary);
    font-size: 13px;
    line-height: 1.5;
}

/* Blockquotes */
.message-text blockquote {
    border-left: 3px solid var(--brand-orange);
    padding-left: 16px;
    margin: 12px 0;
    color: var(--text-secondary);
    font-style: italic;
}

/* Tables */
.message-text table {
    border-collapse: collapse;
    width: 100%;
    margin: 12px 0;
    font-size: 13px;
}

.message-text th {
    background: rgba(255, 167, 38, 0.1);
    border: 1px solid var(--border-color-light);
    padding: 8px 12px;
    text-align: left;
    font-weight: 600;
    color: var(--brand-orange);
}

.message-text td {
    border: 1px solid var(--border-color-light);
    padding: 8px 12px;
    color: var(--text-secondary);
}

.message-text tr:hover {
    background: rgba(255, 167, 38, 0.05);
}

/* Horizontal Rules */
.message-text hr {
    border: none;
    border-top: 1px solid var(--border-color-light);
    margin: 16px 0;
}

/* Links */
.message-text a {
    color: var(--brand-orange);
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: border-color 0.2s ease;
}

.message-text a:hover {
    border-bottom-color: var(--brand-orange);
}

/* Ordered Lists */
.message-text ol {
    margin-left: 18px;
    margin-bottom: 10px;
}

.message-text ol li {
    margin-bottom: 6px;
    color: var(--text-secondary);
}

/* Nested Lists */
.message-text ul ul,
.message-text ul ol,
.message-text ol ul,
.message-text ol ol {
    margin-top: 6px;
    margin-bottom: 6px;
}

/* Collapsible Sections */
.message-text details {
    margin: 12px 0;
    border: 1px solid var(--border-color-light);
    border-radius: 6px;
    background: rgba(0, 0, 0, 0.3);
}

.message-text summary {
    padding: 10px 14px;
    cursor: pointer;
    font-weight: 600;
    color: var(--brand-orange);
    user-select: none;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: background 0.2s ease;
}

.message-text summary:hover {
    background: rgba(255, 167, 38, 0.08);
}

.message-text summary::marker {
    content: '▶ ';
    color: var(--brand-orange);
}

.message-text details[open] summary::marker {
    content: '▼ ';
}

.message-text details > *:not(summary) {
    padding: 0 14px 12px 14px;
}

.message-text details[open] {
    border-color: var(--border-color);
}

/* Action Buttons */
.message-action-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 12px 0;
}

.message-action-btn {
    padding: 8px 14px;
    background: rgba(255, 167, 38, 0.1);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    color: var(--brand-orange);
    font-size: 12px;
    font-weight: 600;
    font-family: 'JetBrains Mono', monospace;
    cursor: pointer;
    transition: all 0.2s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.message-action-btn:hover {
    background: rgba(255, 167, 38, 0.2);
    border-color: var(--brand-orange);
    transform: translateY(-1px);
}

.message-action-btn:active {
    transform: translateY(0);
}

.message-suggestions {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 10px;
}

.suggestion-btn {
    padding: 6px 12px;
    background: rgba(255, 167, 38, 0.08);
    border: 1px solid var(--border-color);
    border-radius: 3px;
    color: var(--text-secondary);
    font-size: 12px;
    cursor: pointer;
    transition: all 0.15s;
    font-family: 'JetBrains Mono', monospace;
}

.suggestion-btn:hover {
    background: rgba(255, 167, 38, 0.15);
    border-color: var(--brand-orange);
    color: var(--brand-orange);
}

/* Quick Actions */
.quick-actions {
    display: flex;
    gap: 8px;
    align-items: center;
    padding: 10px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--border-color-light);
    border-radius: 4px;
    margin-bottom: 12px;
}

.quick-action-label {
    font-size: 10px;
    color: var(--text-tertiary);
    font-weight: 600;
    font-family: 'JetBrains Mono', monospace;
    letter-spacing: 1px;
}

.quick-action-btn {
    padding: 6px 12px;
    background: rgba(255, 167, 38, 0.08);
    border: 1px solid var(--border-color);
    border-radius: 3px;
    color: var(--text-primary);
    font-size: 11px;
    cursor: pointer;
    transition: all 0.15s;
    font-weight: 500;
    font-family: 'JetBrains Mono', monospace;
}

.quick-action-btn:hover {
    background: var(--brand-orange);
    border-color: transparent;
    color: var(--bg-primary);
}

/* Input */
.input-container {
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    padding: 12px;
}

.input-wrapper {
    display: flex;
    gap: 8px;
    align-items: flex-end;
}

#questionInput {
    flex: 1;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--border-color-light);
    border-radius: 4px;
    padding: 10px 12px;
    color: var(--text-primary);
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    resize: none;
    max-height: 100px;
    line-height: 1.4;
}

#questionInput:focus {
    outline: none;
    border-color: var(--brand-orange);
}

#questionInput::placeholder {
    color: var(--text-tertiary);
}

#sendButton {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--brand-orange) 0%, var(--brand-orange-dark) 100%);
    border: none;
    border-radius: 4px;
    color: var(--bg-primary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s;
}

#sendButton:hover {
    transform: translateY(-1px);
}

#sendButton:disabled {
    opacity: 0.5;
}

.input-hint {
    margin-top: 6px;
    font-size: 10px;
    color: var(--text-tertiary);
    text-align: center;
    font-family: 'JetBrains Mono', monospace;
    letter-spacing: 0.5px;
}

/* Directory Section (Right) - Orwell Style */
.directory-section {
    width: 340px;
    background: rgba(0, 0, 0, 0.4);
    border-left: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.directory-header {
    padding: 16px;
    background: rgba(0, 0, 0, 0.3);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.directory-title {
    font-size: 11px;
    font-weight: 700;
    color: var(--brand-orange);
    font-family: 'JetBrains Mono', monospace;
    letter-spacing: 1.5px;
}

.directory-count {
    font-size: 10px;
    color: var(--text-tertiary);
    font-family: 'JetBrains Mono', monospace;
    letter-spacing: 1px;
}

.directory-search {
    padding: 12px 16px;
    border-bottom: 1px solid var(--border-color-light);
}

.directory-search input {
    width: 100%;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid var(--border-color-light);
    border-radius: 3px;
    padding: 8px 10px;
    color: var(--text-primary);
    font-size: 12px;
    font-family: 'JetBrains Mono', monospace;
}

.directory-search input:focus {
    outline: none;
    border-color: var(--brand-orange);
}

.directory-search input::placeholder {
    color: var(--text-tertiary);
    font-size: 11px;
}

.directory-container {
    flex: 1;
    overflow-y: auto;
    padding: 8px 0;
}

.directory-container::-webkit-scrollbar {
    width: 6px;
}

.directory-container::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.2);
}

.directory-container::-webkit-scrollbar-thumb {
    background: var(--brand-orange);
}

/* Directory Team Section */
.directory-team {
    margin-bottom: 16px;
}

.directory-team-header {
    padding: 8px 16px;
    font-size: 10px;
    font-weight: 700;
    color: var(--text-tertiary);
    font-family: 'JetBrains Mono', monospace;
    letter-spacing: 1.2px;
    border-top: 1px solid var(--border-color-light);
    border-bottom: 1px solid var(--border-color-light);
    background: rgba(0, 0, 0, 0.2);
}

/* Directory Person Card - Orwell Style */
.directory-person {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    cursor: pointer;
    transition: all 0.15s;
    border-left: 2px solid transparent;
}

.directory-person:hover {
    background: rgba(255, 167, 38, 0.08);
    border-left-color: var(--brand-orange);
}

.directory-person.active {
    background: rgba(255, 167, 38, 0.12);
    border-left-color: var(--brand-orange);
}

.person-status {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
    font-size: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.status-active {
    background: #4ade80;
    color: #4ade80;
}

.status-leaving {
    background: #ef4444;
    color: #ef4444;
    animation: pulse-red 2s infinite;
}

@keyframes pulse-red {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}

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

.person-name {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.person-role {
    font-size: 10px;
    color: var(--text-tertiary);
    font-family: 'JetBrains Mono', monospace;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.person-tenure {
    font-size: 10px;
    color: var(--text-secondary);
    font-family: 'JetBrains Mono', monospace;
    flex-shrink: 0;
}

/* Person Modal - Orwell Style */
.person-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    animation: fadeIn 0.2s;
}

.modal-content {
    width: 600px;
    max-height: 80vh;
    background: var(--bg-secondary);
    border: 1px solid var(--brand-orange);
    border-radius: 4px;
    display: flex;
    flex-direction: column;
    box-shadow: 0 8px 32px rgba(255, 167, 38, 0.2);
}

.modal-header {
    padding: 16px 20px;
    background: rgba(255, 167, 38, 0.1);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--brand-orange);
    font-family: 'JetBrains Mono', monospace;
    letter-spacing: 1px;
}

.modal-close {
    width: 32px;
    height: 32px;
    background: none;
    border: 1px solid var(--border-color);
    border-radius: 3px;
    color: var(--text-secondary);
    font-size: 24px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    transition: all 0.15s;
}

.modal-close:hover {
    background: var(--brand-orange);
    color: var(--bg-primary);
    border-color: transparent;
}

.modal-body {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
}

.profile-section {
    display: grid;
    gap: 12px;
}

.profile-field {
    display: grid;
    grid-template-columns: 120px 1fr;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid rgba(255, 167, 38, 0.05);
}

.profile-field:last-child {
    border-bottom: none;
}

.profile-label {
    font-size: 10px;
    font-weight: 700;
    color: var(--text-tertiary);
    font-family: 'JetBrains Mono', monospace;
    letter-spacing: 1px;
}

.profile-value {
    font-size: 13px;
    color: var(--text-primary);
    font-family: 'Inter', sans-serif;
}

.profile-alert {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    border-radius: 3px;
    padding: 10px;
}

.profile-alert .profile-label {
    color: #ef4444;
}

.profile-alert .profile-value {
    color: #fca5a5;
}

.modal-actions {
    padding: 16px 20px;
    background: rgba(0, 0, 0, 0.3);
    border-top: 1px solid var(--border-color);
    display: flex;
    gap: 10px;
}

.modal-action-btn {
    flex: 1;
    padding: 10px 16px;
    background: rgba(255, 167, 38, 0.08);
    border: 1px solid var(--border-color);
    border-radius: 3px;
    color: var(--text-primary);
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s;
    font-family: 'JetBrains Mono', monospace;
}

.modal-action-btn:hover {
    background: var(--brand-orange);
    color: var(--bg-primary);
    border-color: transparent;
}

/* Thinking Indicator (in-chat, like ChatGPT/Claude) */
.thinking-message {
    opacity: 0.8;
}

.thinking-text {
    font-style: italic;
    color: var(--text-secondary);
    font-size: 13px;
    font-family: 'JetBrains Mono', monospace;
}

.thinking-dots-animated {
    display: inline-block;
    min-width: 20px;
    text-align: left;
}

/* Loading */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(26, 26, 26, 0.9);
    backdrop-filter: blur(4px);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 999;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(255, 167, 38, 0.1);
    border-top-color: var(--brand-orange);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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

.loading-text {
    margin-top: 12px;
    color: var(--brand-orange);
    font-size: 11px;
    font-weight: 600;
    font-family: 'JetBrains Mono', monospace;
    letter-spacing: 2px;
}

/* Graph View Button */
.header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.graph-view-btn {
    padding: 8px 16px;
    background: rgba(255, 167, 38, 0.1);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    color: var(--brand-orange);
    font-size: 11px;
    font-weight: 600;
    font-family: 'JetBrains Mono', monospace;
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: all 0.15s;
}

.graph-view-btn:hover {
    background: var(--brand-orange);
    color: var(--bg-primary);
    border-color: transparent;
    transform: translateY(-1px);
}

/* Swimlane Modal */
.swimlane-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    animation: fadeIn 0.2s;
}

.swimlane-modal-content {
    width: 96vw;
    height: 92vh;
    background: var(--bg-primary);
    border: 1px solid var(--brand-orange);
    border-radius: 4px;
    display: flex;
    flex-direction: column;
    box-shadow: 0 8px 32px rgba(255, 167, 38, 0.3);
}

.swimlane-header {
    padding: 16px 24px;
    background: rgba(255, 167, 38, 0.1);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.swimlane-title {
    font-size: 14px;
    font-weight: 700;
    color: var(--brand-orange);
    font-family: 'JetBrains Mono', monospace;
    letter-spacing: 2px;
}

.swimlane-stats {
    font-size: 11px;
    color: var(--text-secondary);
    font-family: 'JetBrains Mono', monospace;
    letter-spacing: 1px;
}

.swimlane-close-btn {
    padding: 8px 16px;
    background: rgba(255, 167, 38, 0.1);
    border: 1px solid var(--border-color);
    border-radius: 3px;
    color: var(--brand-orange);
    font-size: 11px;
    font-weight: 600;
    font-family: 'JetBrains Mono', monospace;
    cursor: pointer;
    transition: all 0.15s;
}

.swimlane-close-btn:hover {
    background: var(--brand-orange);
    color: var(--bg-primary);
    border-color: transparent;
}

/* Swimlane Container (Horizontal scrollable lanes) */
.swimlane-container {
    flex: 1;
    display: flex;
    gap: 20px;
    padding: 20px;
    overflow-x: auto;
    overflow-y: hidden;
    align-items: flex-start;
}

.swimlane-container::-webkit-scrollbar {
    height: 10px;
}

.swimlane-container::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.2);
}

.swimlane-container::-webkit-scrollbar-thumb {
    background: var(--brand-orange);
    border-radius: 5px;
}

.swimlane-loading {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

/* Individual Swimlane (Vertical column) */
.swimlane {
    min-width: 280px;
    max-width: 280px;
    display: flex;
    flex-direction: column;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--border-color-light);
    border-radius: 4px;
    flex-shrink: 0;
}

.swimlane-header {
    padding: 12px 16px;
    background: rgba(0, 0, 0, 0.4);
    border-bottom: 1px solid var(--border-color);
    border-left: 4px solid;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.swimlane-team-name {
    font-size: 11px;
    font-weight: 700;
    color: var(--brand-orange);
    font-family: 'JetBrains Mono', monospace;
    letter-spacing: 1px;
}

.swimlane-count {
    font-size: 10px;
    color: var(--text-tertiary);
    font-family: 'JetBrains Mono', monospace;
    background: rgba(255, 167, 38, 0.1);
    padding: 2px 8px;
    border-radius: 3px;
}

.swimlane-cards {
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-height: calc(92vh - 150px);
    overflow-y: auto;
}

.swimlane-cards::-webkit-scrollbar {
    width: 4px;
}

.swimlane-cards::-webkit-scrollbar-thumb {
    background: var(--brand-orange);
    border-radius: 2px;
}

/* Person Card (The key component!) */
.person-card {
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid var(--border-color-light);
    border-left: 3px solid;
    border-radius: 4px;
    padding: 12px;
    cursor: pointer;
    transition: all 0.2s;
}

.person-card:hover {
    background: rgba(255, 167, 38, 0.08);
    border-left-width: 4px;
    transform: translateX(2px);
}

.person-card.card-leaving {
    border-color: rgba(239, 68, 68, 0.5);
    background: rgba(239, 68, 68, 0.05);
}

.person-card.card-leaving:hover {
    border-color: #ef4444;
}

.person-card.expanded {
    background: rgba(255, 167, 38, 0.12);
    border-left-width: 4px;
}

.card-header {
    display: flex;
    gap: 10px;
    align-items: center;
    margin-bottom: 10px;
}

.card-avatar {
    width: 40px;
    height: 40px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 700;
    color: #ffffff;
    font-family: 'JetBrains Mono', monospace;
    flex-shrink: 0;
    border: 2px solid rgba(255, 255, 255, 0.2);
}

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

.card-name {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 2px;
    display: flex;
    align-items: center;
    gap: 4px;
}

.card-warning {
    font-size: 12px;
    color: #ef4444;
}

.card-role {
    font-size: 10px;
    color: var(--text-secondary);
    font-family: 'JetBrains Mono', monospace;
    margin-bottom: 2px;
}

.card-meta {
    font-size: 9px;
    color: var(--text-tertiary);
    font-family: 'JetBrains Mono', monospace;
    letter-spacing: 0.5px;
}

.card-stat {
    font-size: 10px;
    color: var(--text-secondary);
    font-family: 'JetBrains Mono', monospace;
    padding: 6px 8px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 3px;
    margin-bottom: 6px;
}

.critical-stat {
    color: #fca5a5;
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.card-connections {
    margin: 8px 0;
    padding-top: 8px;
    border-top: 1px solid var(--border-color-light);
}

.connections-label {
    font-size: 9px;
    color: var(--text-tertiary);
    font-family: 'JetBrains Mono', monospace;
    letter-spacing: 1px;
    margin-bottom: 6px;
}

.connection-item {
    margin-bottom: 4px;
}

.connection-name {
    font-size: 10px;
    color: var(--text-secondary);
    font-family: 'JetBrains Mono', monospace;
    margin-bottom: 2px;
}

.connection-bar {
    width: 100%;
    height: 4px;
    background: rgba(0, 0, 0, 0.4);
    border-radius: 2px;
    overflow: hidden;
}

.connection-bar-fill {
    height: 100%;
    transition: width 0.3s ease;
}

.card-view-all-btn {
    width: 100%;
    padding: 8px;
    background: rgba(255, 167, 38, 0.08);
    border: 1px solid var(--border-color);
    border-radius: 3px;
    color: var(--brand-orange);
    font-size: 10px;
    font-weight: 600;
    font-family: 'JetBrains Mono', monospace;
    letter-spacing: 0.5px;
    cursor: pointer;
    margin-top: 8px;
    transition: all 0.15s;
}

.card-view-all-btn:hover {
    background: var(--brand-orange);
    color: var(--bg-primary);
    border-color: transparent;
}

/* Expanded Card Section */
.card-expanded-section {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 2px solid var(--brand-orange);
    animation: expandIn 0.2s ease-out;
}

@keyframes expandIn {
    from {
        opacity: 0;
        max-height: 0;
    }
    to {
        opacity: 1;
        max-height: 500px;
    }
}

.expanded-title {
    font-size: 10px;
    font-weight: 700;
    color: var(--brand-orange);
    font-family: 'JetBrains Mono', monospace;
    letter-spacing: 1px;
    margin-bottom: 10px;
}

.expanded-collaborators {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
    margin-bottom: 10px;
}

.mini-card {
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid var(--border-color-light);
    border-radius: 3px;
    padding: 8px;
    display: flex;
    gap: 8px;
    align-items: center;
    cursor: pointer;
    transition: all 0.15s;
}

.mini-card:hover {
    background: rgba(255, 167, 38, 0.1);
    border-color: var(--brand-orange);
}

.mini-avatar {
    width: 28px;
    height: 28px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    font-weight: 700;
    color: #ffffff;
    font-family: 'JetBrains Mono', monospace;
    flex-shrink: 0;
}

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

.mini-name {
    font-size: 10px;
    font-weight: 500;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.mini-count {
    font-size: 8px;
    color: var(--text-tertiary);
    font-family: 'JetBrains Mono', monospace;
}

.collapse-btn {
    width: 100%;
    padding: 6px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--border-color-light);
    border-radius: 3px;
    color: var(--text-secondary);
    font-size: 9px;
    font-weight: 600;
    font-family: 'JetBrains Mono', monospace;
    cursor: pointer;
    transition: all 0.15s;
}

.collapse-btn:hover {
    background: rgba(255, 167, 38, 0.1);
    color: var(--brand-orange);
}

/* Graph Modal */
.graph-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    animation: fadeIn 0.2s;
}

.graph-modal-content {
    width: 95vw;
    height: 90vh;
    background: var(--bg-primary);
    border: 1px solid var(--brand-orange);
    border-radius: 4px;
    display: flex;
    flex-direction: column;
    box-shadow: 0 8px 32px rgba(255, 167, 38, 0.3);
}

.graph-header {
    padding: 16px 24px;
    background: rgba(255, 167, 38, 0.1);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.graph-title {
    font-size: 14px;
    font-weight: 700;
    color: var(--brand-orange);
    font-family: 'JetBrains Mono', monospace;
    letter-spacing: 2px;
}

.graph-controls {
    display: flex;
    gap: 12px;
    align-items: center;
}

.team-filter-select {
    padding: 6px 12px;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid var(--border-color);
    border-radius: 3px;
    color: var(--text-primary);
    font-size: 11px;
    font-family: 'JetBrains Mono', monospace;
    cursor: pointer;
}

.team-filter-select:focus {
    outline: none;
    border-color: var(--brand-orange);
}

.graph-close-btn {
    padding: 8px 16px;
    background: rgba(255, 167, 38, 0.1);
    border: 1px solid var(--border-color);
    border-radius: 3px;
    color: var(--brand-orange);
    font-size: 11px;
    font-weight: 600;
    font-family: 'JetBrains Mono', monospace;
    cursor: pointer;
    transition: all 0.15s;
}

.graph-close-btn:hover {
    background: var(--brand-orange);
    color: var(--bg-primary);
    border-color: transparent;
}

.graph-legend {
    padding: 12px 24px;
    background: rgba(0, 0, 0, 0.3);
    border-bottom: 1px solid var(--border-color-light);
    display: flex;
    gap: 20px;
    align-items: center;
    font-size: 11px;
    color: var(--text-secondary);
    font-family: 'JetBrains Mono', monospace;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 6px;
}

.legend-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.legend-separator {
    color: var(--text-tertiary);
    margin: 0 4px;
}

.graph-container {
    flex: 1;
    background: rgba(0, 0, 0, 0.2);
    position: relative;
    min-height: 500px;
    height: 100%;
}

.graph-loading {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(26, 26, 26, 0.8);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 10;
}

/* Card Grid Modal Styles */
.card-grid-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.card-grid-modal-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.92);
    backdrop-filter: blur(6px);
}

.card-grid-modal-content {
    position: relative;
    width: 96vw;
    height: 92vh;
    background: var(--bg-primary);
    border: 2px solid var(--border-color);
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.8);
    animation: fadeIn 0.3s ease-out;
}

.card-grid-header {
    padding: 16px 24px;
    background: rgba(255, 167, 38, 0.1);
    border-bottom: 2px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-shrink: 0;
}

.card-grid-title {
    font-size: 14px;
    font-weight: 700;
    color: var(--brand-orange);
    font-family: 'JetBrains Mono', monospace;
    letter-spacing: 2px;
}

.card-grid-stats {
    font-size: 11px;
    color: var(--text-secondary);
    font-family: 'JetBrains Mono', monospace;
    letter-spacing: 1px;
}

.card-grid-close-btn {
    padding: 8px 16px;
    background: rgba(255, 167, 38, 0.1);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    color: var(--brand-orange);
    font-size: 11px;
    font-weight: 600;
    font-family: 'JetBrains Mono', monospace;
    cursor: pointer;
    transition: all 0.3s ease;
}

.card-grid-close-btn:hover {
    background: var(--brand-orange);
    color: var(--bg-primary);
    transform: translateY(-2px);
}

.card-grid-wrapper {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    min-height: 0;
}

.card-grid-wrapper::-webkit-scrollbar {
    width: 8px;
}

.card-grid-wrapper::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.2);
}

.card-grid-wrapper::-webkit-scrollbar-thumb {
    background: var(--brand-orange);
    border-radius: 4px;
}

/* Card Grid */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 20px;
    max-width: 1600px;
    margin: 0 auto;
}

.card-grid-loading {
    grid-column: 1 / -1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    gap: 12px;
}

/* Team Header Divider */
.grid-team-header {
    grid-column: 1 / -1;
    display: flex;
    align-items: center;
    gap: 16px;
    margin: 16px 0 8px 0;
    opacity: 0.6;
}

.grid-team-header-line {
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--border-color-light) 20%, var(--border-color-light) 80%, transparent);
}

.grid-team-header-text {
    font-size: 10px;
    font-weight: 600;
    color: var(--brand-orange);
    font-family: 'JetBrains Mono', monospace;
    text-transform: uppercase;
    letter-spacing: 2px;
    padding: 0 8px;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 8px;
}

.grid-team-count {
    font-size: 9px;
    color: var(--text-tertiary);
    background: rgba(255, 167, 38, 0.1);
    padding: 2px 6px;
    border-radius: 4px;
    font-weight: 500;
    letter-spacing: 0;
}

/* Individual Grid Card */
.grid-person-card {
    background: linear-gradient(135deg, var(--card-bg) 0%, rgba(255, 167, 38, 0.08) 100%);
    border: 2px solid var(--border-color);
    border-radius: 12px;
    padding: 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
    transition: all 0.3s ease;
    cursor: pointer;
}

.grid-person-card:hover {
    background: linear-gradient(135deg, rgba(255, 167, 38, 0.12) 0%, rgba(255, 167, 38, 0.15) 100%);
    border-color: var(--brand-orange);
    transform: translateY(-8px) scale(1.03);
    box-shadow: 0 20px 40px rgba(255, 167, 38, 0.3), 0 30px 60px rgba(0, 0, 0, 0.5);
}

.grid-card-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    font-weight: 700;
    color: #ffffff;
    font-family: 'JetBrains Mono', monospace;
    margin-bottom: 10px;
    border: 2px solid rgba(255, 255, 255, 0.2);
}

.grid-card-name {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 12px;
    text-align: center;
    width: 100%;
}

.grid-card-field {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 5px 8px;
    margin-bottom: 4px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--border-color-light);
    border-radius: 3px;
}

.grid-card-field-label {
    font-size: 9px;
    font-weight: 700;
    color: var(--text-tertiary);
    font-family: 'JetBrains Mono', monospace;
    text-transform: uppercase;
}

.grid-card-field-value {
    font-size: 10px;
    color: var(--text-primary);
    font-weight: 500;
    text-align: right;
}

.grid-card-status {
    margin-top: auto;
    justify-content: center;
    padding: 4px 10px;
    border-radius: 12px;
    background: rgba(239, 68, 68, 0.15);
    border-color: rgba(239, 68, 68, 0.4);
}

.grid-card-status .grid-card-field-value {
    color: #ef4444;
    font-weight: 600;
    font-size: 8px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

/* Card Controls Section */
.card-controls-section {
    padding: 12px 20px;
    background: linear-gradient(135deg, var(--card-bg) 0%, rgba(255, 167, 38, 0.08) 100%);
    border-top: 2px solid var(--border-color);
    border-radius: 0 0 12px 12px;
    flex-shrink: 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.card-quick-filters {
    display: flex;
    gap: 8px;
    align-items: center;
}

.card-filter-btn {
    padding: 8px 16px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--border-color-light);
    border-radius: 8px;
    color: var(--text-secondary);
    font-size: 10px;
    font-weight: 500;
    font-family: 'JetBrains Mono', monospace;
    cursor: pointer;
    transition: all 0.3s ease;
}

.card-filter-btn:hover {
    background: rgba(255, 167, 38, 0.1);
    border-color: var(--border-color);
    color: var(--text-primary);
    transform: translateY(-2px);
}

.card-filter-btn.active {
    background: rgba(255, 167, 38, 0.12);
    border-color: var(--border-color);
    color: var(--brand-orange);
}

.card-more-btn {
    padding: 8px 16px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--border-color-light);
    border-radius: 8px;
    color: var(--text-secondary);
    font-size: 10px;
    font-weight: 600;
    font-family: 'JetBrains Mono', monospace;
    cursor: pointer;
    transition: all 0.3s ease;
}

.card-more-btn:hover {
    background: rgba(255, 167, 38, 0.12);
    border-color: var(--border-color);
    color: var(--brand-orange);
    transform: translateY(-2px);
}

.card-search-container {
    display: flex;
    gap: 8px;
    align-items: center;
}

.card-search-input {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--border-color-light);
    border-radius: 8px;
    padding: 8px 14px;
    color: var(--text-primary);
    font-size: 11px;
    width: 200px;
    transition: all 0.3s ease;
}

.card-search-input:focus {
    outline: none;
    border-color: var(--border-color);
    background: rgba(0, 0, 0, 0.4);
}

.card-search-input::placeholder {
    color: var(--text-tertiary);
}

.card-search-btn {
    padding: 8px 16px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--border-color-light);
    border-radius: 8px;
    color: var(--text-secondary);
    font-size: 10px;
    font-weight: 500;
    font-family: 'JetBrains Mono', monospace;
    cursor: pointer;
    transition: all 0.3s ease;
}

.card-search-btn:hover {
    background: rgba(255, 167, 38, 0.12);
    border-color: var(--border-color);
    color: var(--brand-orange);
    transform: translateY(-2px);
}

/* More Menu */
.card-more-menu {
    display: none;
    position: fixed;
    bottom: 80px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2100;
}

.card-more-menu.active {
    display: block;
    animation: slideUp 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes slideUp {
    from {
        transform: translateX(-50%) translateY(30px);
        opacity: 0;
    }
    to {
        transform: translateX(-50%) translateY(0);
        opacity: 1;
    }
}

.card-more-menu-content {
    background: linear-gradient(135deg, rgba(30, 30, 30, 0.98) 0%, rgba(42, 36, 32, 0.98) 100%);
    border: 2px solid var(--border-color);
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.8);
    min-width: 500px;
}

.card-more-menu-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border-color-light);
}

.card-more-menu-header h3 {
    font-size: 12px;
    font-weight: 700;
    color: var(--text-secondary);
    font-family: 'JetBrains Mono', monospace;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.card-more-close-btn {
    width: 28px;
    height: 28px;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid var(--border-color-light);
    border-radius: 50%;
    color: var(--text-secondary);
    font-size: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.card-more-close-btn:hover {
    background: rgba(255, 167, 38, 0.12);
    border-color: var(--border-color);
    color: var(--brand-orange);
    transform: rotate(90deg);
}

.card-more-menu-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}

.card-more-filter-btn {
    padding: 12px 16px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--border-color-light);
    border-radius: 8px;
    color: var(--text-secondary);
    font-size: 11px;
    font-weight: 500;
    font-family: 'JetBrains Mono', monospace;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
}

.card-more-filter-btn:hover {
    background: rgba(255, 167, 38, 0.12);
    border-color: var(--border-color);
    color: var(--brand-orange);
    transform: translateY(-2px);
}

/* Person Detail Modal */
.person-card-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 3000;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding-top: 8vh;
}

.person-card-modal-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(4px);
}

.person-card-modal-card {
    position: relative;
    /* Width, height, display, padding now inline in HTML for new design */
    background: #1e1e1e;
    border: 2px solid var(--border-color);
    border-radius: 16px;
    box-shadow: 0 40px 100px rgba(0, 0, 0, 0.8);
    animation: cardPopIn 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes cardPopIn {
    from {
        transform: scale(0.5);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

.person-card-close-btn {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 36px;
    height: 36px;
    background: rgba(0, 0, 0, 0.6);
    border: 1px solid var(--brand-orange);
    border-radius: 50%;
    color: var(--brand-orange);
    font-size: 24px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.person-card-close-btn:hover {
    background: var(--brand-orange);
    color: var(--bg-primary);
    transform: rotate(90deg);
}

.person-card-modal-content {
    /* Styles now inline in HTML for new horizontal header design */
}

.person-card-modal-avatar {
    /* Avatar now 60px (defined inline), font 24px (defined inline) */
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    color: #ffffff;
    font-family: 'JetBrains Mono', monospace;
    border: 4px solid rgba(255, 255, 255, 0.2);
}

.person-card-modal-name {
    /* Styles now inline in HTML for horizontal header */
    font-weight: 700;
    color: var(--text-primary);
}

.person-card-modal-role {
    /* Styles now inline in HTML for horizontal header */
    color: var(--text-secondary);
}

.person-card-modal-section {
    width: 100%;
    margin-bottom: 28px;
}

.person-card-modal-section h3 {
    font-size: 13px;
    color: var(--brand-orange);
    font-family: 'JetBrains Mono', monospace;
    letter-spacing: 1.5px;
    text-align: center;
    margin-bottom: 16px;
}

.person-card-detail-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.person-card-detail-item {
    display: flex;
    justify-content: space-between;
    padding: 8px 12px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--border-color-light);
    border-radius: 4px;
}

.person-card-detail-label {
    font-size: 10px;
    font-weight: 700;
    color: var(--text-tertiary);
    font-family: 'JetBrains Mono', monospace;
    text-transform: uppercase;
}

.person-card-detail-value {
    font-size: 11px;
    color: var(--text-primary);
    font-weight: 500;
}

.person-card-skills-text {
    /* Styles now inline in HTML */
    color: var(--text-primary);
}

.person-card-action-buttons {
    display: flex;
    gap: 12px;
    width: 100%;
    margin-top: 8px;
}

.person-card-action-btn {
    flex: 1;
    padding: 10px 14px;
    background: rgba(255, 167, 38, 0.1);
    border: 1px solid var(--border-color-light);
    border-radius: 6px;
    color: var(--text-secondary);
    font-size: 10px;
    font-weight: 600;
    font-family: 'JetBrains Mono', monospace;
    cursor: pointer;
    transition: all 0.3s ease;
}

.person-card-action-btn:hover {
    background: rgba(255, 167, 38, 0.15);
    border-color: var(--border-color);
    color: var(--brand-orange);
    transform: translateY(-1px);
}

.person-card-contact-buttons {
    display: flex;
    gap: 12px;
    width: 100%;
    margin: 20px 0;
}

.person-card-contact-btn {
    flex: 1;
    padding: 10px 14px;
    background: rgba(255, 167, 38, 0.08);
    border: 1px solid var(--border-color-light);
    border-radius: 6px;
    color: var(--text-primary);
    font-size: 11px;
    font-weight: 500;
    font-family: 'Inter', sans-serif;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.person-card-contact-btn:hover {
    background: rgba(255, 167, 38, 0.12);
    border-color: var(--border-color);
    color: var(--brand-orange);
    transform: translateY(-1px);
}

.person-card-relationships-btn {
    width: 100%;
    margin-top: 20px;
    padding: 12px 20px;
    background: rgba(255, 167, 38, 0.1);
    border: 2px solid var(--border-color);
    border-radius: 8px;
    color: var(--brand-orange);
    font-size: 11px;
    font-weight: 600;
    font-family: 'JetBrains Mono', monospace;
    letter-spacing: 1px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
}

.person-card-relationships-btn:hover {
    background: rgba(255, 167, 38, 0.15);
    border-color: var(--brand-orange);
    transform: translateY(-2px);
}

/* Relationship View */
.card-relationship-view {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 4000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.card-relationship-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.9);
}

.card-relationship-container {
    position: relative;
    width: 95vw;
    max-width: 1400px;
    height: 85vh;
    background: #1e1e1e;
    border: 2px solid var(--border-color);
    border-radius: 16px;
    padding: 32px;
    box-shadow: 0 40px 100px rgba(0, 0, 0, 0.9);
    animation: relationshipSlideIn 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes relationshipSlideIn {
    from {
        transform: scale(0.9) translateY(30px);
        opacity: 0;
    }
    to {
        transform: scale(1) translateY(0);
        opacity: 1;
    }
}

.card-relationship-close-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    padding: 8px 16px;
    background: rgba(0, 0, 0, 0.6);
    border: 1px solid var(--border-color-light);
    border-radius: 6px;
    color: var(--text-secondary);
    font-size: 11px;
    font-weight: 600;
    font-family: 'JetBrains Mono', monospace;
    cursor: pointer;
    transition: all 0.3s ease;
}

.card-relationship-close-btn:hover {
    background: rgba(255, 167, 38, 0.12);
    border-color: var(--border-color);
    color: var(--brand-orange);
}

.card-relationship-content {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 32px;
    height: 100%;
}

.card-relationship-left {
    display: flex;
    flex-direction: column;
}

.card-focus-card {
    background: linear-gradient(135deg, var(--card-bg) 0%, rgba(255, 167, 38, 0.08) 100%);
    border: 2px solid var(--border-color);
    border-radius: 12px;
    padding: 24px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.card-focus-avatar {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 36px;
    font-weight: 700;
    color: #ffffff;
    font-family: 'JetBrains Mono', monospace;
    margin-bottom: 16px;
    border: 3px solid rgba(255, 255, 255, 0.2);
}

.card-focus-name {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 6px;
    text-align: center;
    color: var(--text-primary);
}

.card-focus-role {
    font-size: 11px;
    color: var(--text-secondary);
    margin-bottom: 20px;
    text-align: center;
}

.card-focus-stats {
    width: 100%;
    padding: 16px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 8px;
    border: 1px solid var(--border-color-light);
    display: flex;
    gap: 16px;
    justify-content: space-around;
}

.card-stat-divider {
    width: 1px;
    background: var(--border-color-light);
}

.card-stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    flex: 1;
}

.card-stat-value {
    font-size: 24px;
    font-weight: 700;
    color: var(--brand-orange);
    font-family: 'JetBrains Mono', monospace;
}

.card-stat-label {
    font-size: 10px;
    color: var(--text-tertiary);
    font-family: 'JetBrains Mono', monospace;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.card-relationship-right {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    overflow-y: auto;
}

.card-connection-lane {
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--border-color-light);
    border-radius: 8px;
    padding: 16px;
    display: flex;
    flex-direction: column;
}

.card-lane-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--border-color-light);
}

.card-lane-header h3 {
    font-size: 11px;
    font-weight: 700;
    color: var(--text-secondary);
    font-family: 'JetBrains Mono', monospace;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.card-lane-count {
    font-size: 10px;
    color: var(--text-tertiary);
    font-family: 'JetBrains Mono', monospace;
    background: rgba(255, 167, 38, 0.1);
    padding: 2px 8px;
    border-radius: 4px;
}

.card-lane-cards {
    display: flex;
    flex-direction: column;
    gap: 8px;
    overflow-y: auto;
}

.card-mini-card {
    background: rgba(255, 167, 38, 0.05);
    border: 1px solid var(--border-color-light);
    border-radius: 8px;
    padding: 12px;
    display: flex;
    gap: 12px;
    align-items: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.card-mini-card:hover {
    background: rgba(255, 167, 38, 0.12);
    border-color: var(--border-color);
    transform: translateX(4px);
}

.card-mini-avatar {
    width: 40px;
    height: 40px;
    min-width: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 700;
    color: #ffffff;
    font-family: 'JetBrains Mono', monospace;
    border: 2px solid rgba(255, 255, 255, 0.2);
}

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

.card-mini-name {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 2px;
}

.card-mini-role {
    font-size: 9px;
    color: var(--text-tertiary);
    font-family: 'JetBrains Mono', monospace;
}

.card-mini-meta {
    font-size: 9px;
    color: var(--brand-orange);
    font-family: 'JetBrains Mono', monospace;
    font-weight: 600;
}

.card-system-card {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    border-radius: 6px;
    padding: 10px;
}

.card-system-name {
    font-size: 11px;
    color: var(--text-primary);
    font-weight: 600;
    margin-bottom: 4px;
}

.card-system-risk {
    font-size: 8px;
    color: #ef4444;
    font-family: 'JetBrains Mono', monospace;
    text-transform: uppercase;
}

/* Notification Bell Button */
.notification-btn {
    position: relative;
    background: rgba(255, 167, 38, 0.1);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    padding: 6px 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--brand-orange);
    font-size: 11px;
    font-weight: 600;
    font-family: 'JetBrains Mono', monospace;
    letter-spacing: 1px;
    transition: all 0.15s;
}

.notification-btn:hover {
    background: var(--brand-orange);
    color: var(--bg-primary);
    border-color: transparent;
    transform: translateY(-1px);
}

.notification-icon {
    font-size: 14px;
}

.notification-badge {
    background: #ef4444;
    color: white;
    font-size: 10px;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 10px;
    min-width: 18px;
    text-align: center;
    animation: pulse 2s infinite;
}

/* Notification Dropdown */
.notification-dropdown {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    width: 520px;
    max-height: 70vh;
    background: var(--bg-secondary);
    border: 1px solid var(--brand-orange);
    border-radius: 4px;
    box-shadow: 0 8px 32px rgba(255, 167, 38, 0.2);
    z-index: 1000;
    display: none;
    flex-direction: column;
    animation: fadeIn 0.2s;
}

.notification-dropdown.active {
    display: flex;
}

.notification-header {
    padding: 16px 20px;
    background: rgba(255, 167, 38, 0.1);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.notification-title {
    font-size: 14px;
    font-weight: 700;
    color: var(--brand-orange);
    font-family: 'JetBrains Mono', monospace;
    letter-spacing: 2px;
}

.notification-actions {
    display: flex;
    gap: 10px;
}

.notification-action-btn {
    background: rgba(255, 167, 38, 0.08);
    border: 1px solid var(--border-color);
    border-radius: 3px;
    color: var(--text-primary);
    font-size: 10px;
    font-weight: 500;
    cursor: pointer;
    padding: 6px 10px;
    transition: all 0.15s;
    font-family: 'JetBrains Mono', monospace;
}

.notification-action-btn:hover {
    background: var(--brand-orange);
    color: var(--bg-primary);
    border-color: transparent;
}

.notification-list {
    flex: 1;
    overflow-y: auto;
    padding: 10px;
}

.notification-list::-webkit-scrollbar {
    width: 6px;
}

.notification-list::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.2);
}

.notification-list::-webkit-scrollbar-thumb {
    background: var(--brand-orange);
}

/* Notification Item */
.notification-item {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--border-color-light);
    border-left: 3px solid transparent;
    border-radius: 4px;
    padding: 14px;
    margin-bottom: 10px;
    cursor: pointer;
    transition: all 0.15s;
}

.notification-item:hover {
    background: rgba(255, 167, 38, 0.08);
    border-left-color: var(--brand-orange);
    transform: translateX(2px);
}

.notification-item.unread {
    border-left-color: var(--brand-orange);
    background: rgba(255, 167, 38, 0.05);
}

.notification-item-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 8px;
}

.notification-type {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-family: 'JetBrains Mono', monospace;
}

.notification-type.critical {
    color: #ef4444;
}

.notification-type.warning {
    color: #f59e0b;
}

.notification-type.info {
    color: var(--brand-orange);
}

.notification-type.success {
    color: #10b981;
}

.notification-icon-type {
    font-size: 12px;
}

.notification-time {
    font-size: 10px;
    color: var(--text-tertiary);
    font-family: 'JetBrains Mono', monospace;
    letter-spacing: 0.5px;
}

.notification-content {
    margin-bottom: 10px;
}

.notification-message {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 6px;
    line-height: 1.4;
}

.notification-detail {
    font-size: 12px;
    color: var(--text-secondary);
    line-height: 1.5;
}

.notification-meta {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.notification-tag {
    background: rgba(255, 167, 38, 0.1);
    border: 1px solid var(--border-color-light);
    color: var(--brand-orange);
    font-size: 9px;
    font-weight: 600;
    padding: 3px 8px;
    border-radius: 3px;
    font-family: 'JetBrains Mono', monospace;
    letter-spacing: 0.5px;
}

.notification-tag.person {
    background: rgba(16, 185, 129, 0.1);
    border-color: rgba(16, 185, 129, 0.2);
    color: #10b981;
}

.notification-tag.team {
    background: rgba(245, 158, 11, 0.1);
    border-color: rgba(245, 158, 11, 0.2);
    color: #f59e0b;
}

.notification-footer {
    padding: 12px 20px;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: center;
    background: rgba(0, 0, 0, 0.3);
}

.view-all-btn {
    background: rgba(255, 167, 38, 0.08);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    font-size: 11px;
    font-weight: 500;
    padding: 8px 16px;
    border-radius: 3px;
    cursor: pointer;
    transition: all 0.15s;
    width: 100%;
    font-family: 'JetBrains Mono', monospace;
}

.view-all-btn:hover {
    background: var(--brand-orange);
    color: var(--bg-primary);
    border-color: transparent;
}

.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-tertiary);
}

.empty-state-icon {
    font-size: 48px;
    margin-bottom: 16px;
    opacity: 0.5;
}

.empty-state-text {
    font-size: 12px;
    font-family: 'JetBrains Mono', monospace;
    letter-spacing: 0.5px;
}

/* Detail Modal */
.notification-detail-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(4px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    animation: fadeIn 0.2s;
}

.notification-detail-modal.active {
    display: flex;
}

.notification-detail-content {
    width: 600px;
    max-height: 80vh;
    background: var(--bg-secondary);
    border: 1px solid var(--brand-orange);
    border-radius: 4px;
    display: flex;
    flex-direction: column;
    box-shadow: 0 8px 32px rgba(255, 167, 38, 0.2);
}

.notification-detail-header {
    padding: 16px 20px;
    background: rgba(255, 167, 38, 0.1);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.notification-detail-title {
    font-size: 14px;
    font-weight: 700;
    color: var(--brand-orange);
    font-family: 'JetBrains Mono', monospace;
    letter-spacing: 1px;
}

.notification-detail-close {
    width: 32px;
    height: 32px;
    background: none;
    border: 1px solid var(--border-color);
    border-radius: 3px;
    color: var(--text-secondary);
    font-size: 24px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    transition: all 0.15s;
}

.notification-detail-close:hover {
    background: var(--brand-orange);
    color: var(--bg-primary);
    border-color: transparent;
}

.notification-detail-body {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
}

.notification-detail-section {
    margin-bottom: 20px;
}

.notification-detail-section h3 {
    font-size: 11px;
    font-weight: 700;
    color: var(--text-tertiary);
    font-family: 'JetBrains Mono', monospace;
    letter-spacing: 1px;
    text-transform: uppercase;
    margin-bottom: 10px;
}

.notification-detail-section p {
    font-size: 13px;
    color: var(--text-primary);
    line-height: 1.6;
}

.notification-detail-actions {
    padding: 16px 20px;
    background: rgba(0, 0, 0, 0.3);
    border-top: 1px solid var(--border-color);
    display: flex;
    gap: 10px;
}

.notification-detail-btn {
    flex: 1;
    padding: 10px 16px;
    background: rgba(255, 167, 38, 0.08);
    border: 1px solid var(--border-color);
    border-radius: 3px;
    color: var(--text-primary);
    font-size: 11px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s;
    font-family: 'JetBrains Mono', monospace;
}

.notification-detail-btn:hover {
    background: var(--brand-orange);
    color: var(--bg-primary);
    border-color: transparent;
}

/* Notification Center Modal (Full Page) */
.notification-center-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 3000;
    display: none;
    align-items: center;
    justify-content: center;
}

.notification-center-modal.active {
    display: flex;
}

.notification-center-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.92);
    backdrop-filter: blur(6px);
}

.notification-center-content {
    position: relative;
    width: 96vw;
    height: 92vh;
    background: var(--bg-primary);
    border: 2px solid var(--border-color);
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.8);
    animation: fadeIn 0.3s ease-out;
}

.notification-center-header {
    padding: 16px 24px;
    background: rgba(255, 167, 38, 0.1);
    border-bottom: 2px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-shrink: 0;
}

.notification-center-title {
    font-size: 14px;
    font-weight: 700;
    color: var(--brand-orange);
    font-family: 'JetBrains Mono', monospace;
    letter-spacing: 2px;
}

.notification-center-stats {
    font-size: 11px;
    color: var(--text-secondary);
    font-family: 'JetBrains Mono', monospace;
    letter-spacing: 1px;
}

.notification-center-close-btn {
    padding: 8px 16px;
    background: rgba(255, 167, 38, 0.1);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    color: var(--brand-orange);
    font-size: 11px;
    font-weight: 600;
    font-family: 'JetBrains Mono', monospace;
    cursor: pointer;
    transition: all 0.3s ease;
}

.notification-center-close-btn:hover {
    background: var(--brand-orange);
    color: var(--bg-primary);
    transform: translateY(-2px);
}

.notification-center-body {
    display: flex;
    flex: 1;
    overflow: hidden;
}

/* Sidebar with tabs */
.notification-center-sidebar {
    width: 200px;
    background: rgba(0, 0, 0, 0.3);
    border-right: 1px solid var(--border-color-light);
    display: flex;
    flex-direction: column;
    padding: 16px;
}

.notification-tab {
    padding: 12px 16px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--border-color-light);
    border-radius: 4px;
    color: var(--text-secondary);
    font-size: 11px;
    font-weight: 500;
    font-family: 'JetBrains Mono', monospace;
    cursor: pointer;
    transition: all 0.15s;
    margin-bottom: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.notification-tab:hover {
    background: rgba(255, 167, 38, 0.08);
    border-color: var(--border-color);
    color: var(--text-primary);
}

.notification-tab.active {
    background: rgba(255, 167, 38, 0.12);
    border-color: var(--brand-orange);
    color: var(--brand-orange);
}

.notification-tab-count {
    background: rgba(255, 167, 38, 0.2);
    padding: 2px 6px;
    border-radius: 10px;
    font-size: 9px;
    font-weight: 700;
}

/* Main notification area */
.notification-center-main {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.notification-center-filters {
    padding: 16px 24px;
    background: rgba(0, 0, 0, 0.2);
    border-bottom: 1px solid var(--border-color-light);
    display: flex;
    gap: 12px;
    align-items: center;
}

.filter-btn {
    padding: 8px 16px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--border-color-light);
    border-radius: 8px;
    color: var(--text-secondary);
    font-size: 10px;
    font-weight: 500;
    font-family: 'JetBrains Mono', monospace;
    cursor: pointer;
    transition: all 0.3s ease;
}

.filter-btn:hover {
    background: rgba(255, 167, 38, 0.1);
    border-color: var(--border-color);
    color: var(--text-primary);
}

.filter-btn.active {
    background: rgba(255, 167, 38, 0.12);
    border-color: var(--brand-orange);
    color: var(--brand-orange);
}

.notification-center-list {
    flex: 1;
    overflow-y: auto;
    padding: 20px 24px;
}

.notification-center-list::-webkit-scrollbar {
    width: 8px;
}

.notification-center-list::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.2);
}

.notification-center-list::-webkit-scrollbar-thumb {
    background: var(--brand-orange);
    border-radius: 4px;
}

.notification-center-item {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--border-color-light);
    border-left: 3px solid transparent;
    border-radius: 4px;
    padding: 16px;
    margin-bottom: 12px;
    cursor: pointer;
    transition: all 0.15s;
}

.notification-center-item:hover {
    background: rgba(255, 167, 38, 0.08);
    border-left-color: var(--brand-orange);
    transform: translateX(4px);
}

.notification-center-item.unread {
    border-left-color: var(--brand-orange);
    background: rgba(255, 167, 38, 0.05);
}

.notification-center-item.resolved {
    opacity: 0.6;
}

.notification-center-item.expanded {
    border-left-color: var(--brand-orange);
    background: rgba(255, 167, 38, 0.08);
}

.notification-expanded-content {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--border-color-light);
    animation: expandDown 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
}

@keyframes expandDown {
    from {
        opacity: 0;
        max-height: 0;
        margin-top: 0;
        padding-top: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        max-height: 600px;
        margin-top: 16px;
        padding-top: 16px;
        transform: translateY(0);
    }
}

.notification-expanded-section {
    margin-bottom: 16px;
}

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

.notification-expanded-section h4 {
    font-size: 10px;
    font-weight: 700;
    color: var(--text-tertiary);
    font-family: 'JetBrains Mono', monospace;
    letter-spacing: 1px;
    text-transform: uppercase;
    margin-bottom: 8px;
}

.notification-expanded-section p {
    font-size: 12px;
    color: var(--text-primary);
    line-height: 1.6;
}

.notification-expanded-actions {
    display: flex;
    gap: 8px;
    margin-top: 16px;
}

.notification-expanded-btn {
    padding: 8px 14px;
    background: rgba(255, 167, 38, 0.08);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    color: var(--text-primary);
    font-size: 10px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s;
    font-family: 'JetBrains Mono', monospace;
}

.notification-expanded-btn:hover {
    background: var(--brand-orange);
    color: var(--bg-primary);
    border-color: transparent;
}

.notification-collapse-indicator {
    font-size: 10px;
    color: var(--text-tertiary);
    font-family: 'JetBrains Mono', monospace;
    margin-top: 12px;
    text-align: center;
    opacity: 0.7;
}

/* Responsive */
@media (max-width: 1024px) {
    .directory-section {
        display: none;
    }

    .graph-view-btn {
        font-size: 10px;
        padding: 6px 12px;
    }

    .card-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 16px;
    }

    .card-relationship-content {
        grid-template-columns: 1fr;
    }

    .card-relationship-left {
        display: none;
    }
}

/* ========================================
   New Unified Profile Card Design
   ======================================== */

.profile-header-bar {
    display: flex;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    border-left: 4px solid #ffa726;
    background: linear-gradient(90deg, rgba(255,167,38,0.05) 0%, transparent 100%);
}

.profile-avatar-small {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    font-weight: 700;
    color: #ffffff;
    background: linear-gradient(135deg, #ffa726, #ff9800);
    border: 2px solid rgba(255, 255, 255, 0.2);
    flex-shrink: 0;
}

.profile-header-info {
    margin-left: 16px;
    flex: 1;
}

.profile-name-large {
    font-size: 20px;
    font-weight: 700;
    margin: 0 0 4px 0;
    color: var(--text-primary);
}

.profile-role-text {
    font-size: 13px;
    color: var(--text-secondary);
    margin: 0;
}

.profile-team-badge {
    margin-top: 6px;
    font-size: 10px;
    color: var(--accent-primary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
}

.profile-body-section {
    padding: 12px 24px;
}

.profile-info-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 10px;
}

.profile-info-card {
    background: rgba(0,0,0,0.2);
    padding: 12px;
    border-radius: 6px;
    border: 1px solid rgba(255,255,255,0.1);
}

.profile-card-title {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--accent-primary);
    margin-bottom: 8px;
    font-weight: 600;
}

.profile-card-content {
    font-size: 11px;
    line-height: 1.8;
}

.profile-section-full {
    background: rgba(0,0,0,0.2);
    padding: 12px;
    border-radius: 6px;
    border: 1px solid rgba(255,255,255,0.1);
    margin-bottom: 10px;
}

.profile-section-text {
    font-size: 12px;
    line-height: 1.6;
}

.profile-footer-actions {
    border-top: 1px solid rgba(255,255,255,0.1);
    padding: 16px;
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.profile-footer-network {
    border-top: 1px solid rgba(255,255,255,0.1);
    padding: 16px;
    padding-top: 12px;
}

/* Clickable Person Names in Chat */
.message-text a.person-name-link {
    color: var(--brand-orange) !important;
    text-decoration: none !important;
    font-weight: 600 !important;
    border-bottom: 1px dashed var(--brand-orange) !important;
    padding: 0 !important;
    margin: 0 !important;
    cursor: pointer;
    transition: color 0.2s ease, border-bottom 0.2s ease;
    display: inline !important;
    line-height: inherit !important;
    vertical-align: baseline !important;
}

.message-text a.person-name-link:hover {
    color: var(--accent-secondary) !important;
    border-bottom: 2px solid var(--accent-secondary) !important;
}

/* ========================================
   UNIFIED DEMO - SLIDING VIEWS
   ======================================== */

/* Tree Panel - Initially hidden off-screen to the left */
.tree-panel {
    position: fixed;
    left: -450px;  /* Hidden off-screen */
    top: 70px;  /* Below header */
    width: 450px;
    height: calc(100vh - 70px);
    background: var(--bg-primary);  /* Match original port 6087 */
    border-right: 1px solid var(--border-color);
    z-index: 100;
    transition: left 0.4s cubic-bezier(0.4, 0.0, 0.2, 1);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.tree-panel.visible {
    left: 0;  /* Slide in */
}

/* Main Layout Transitions */
.main-layout {
    transition: all 0.4s cubic-bezier(0.4, 0.0, 0.2, 1);
    margin-left: 0;
}

.main-layout.documents-view {
    margin-left: 450px;  /* Push right when tree is visible */
}

.main-layout.documents-view .directory-section {
    transform: translateX(100vw);  /* Slide directory off to the right */
    opacity: 0;
    pointer-events: none;
    width: 0;  /* Don't take up layout space when hidden */
    min-width: 0;
    overflow: hidden;
    border: none;
}

/* Directory Section Transitions */
.directory-section {
    transition: all 0.4s cubic-bezier(0.4, 0.0, 0.2, 1);
    transform: translateX(0);
    opacity: 1;
}

/* Chat Section adjustments for documents view */
.main-layout.documents-view .chat-section {
    /* flex: 1 will now make it expand to fill all available space */
    max-width: 100%;
}

/* Tree Header */
.tree-header {
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--border-color);
}

.tree-header h2 {
    margin: 0 0 0.75rem 0;
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--brand-orange);
}

.tree-search {
    margin-bottom: 12px;
}

.tree-search input {
    width: 100%;
    padding: 0.6rem 0.85rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 167, 38, 0.3);
    border-radius: 6px;
    color: var(--text-primary);
    font-size: 14px;
    font-family: 'Inter', sans-serif;
}

.tree-search input:focus {
    outline: none;
    border-color: var(--brand-orange);
    background: rgba(255, 255, 255, 0.08);
}

.tree-search input::placeholder {
    color: #666;
}

.tree-actions {
    display: flex;
    gap: 0.5rem;
}

.tree-action-btn {
    flex: 1;
    padding: 0.45rem 0.75rem;
    background: rgba(255, 167, 38, 0.1);
    border: 1px solid rgba(255, 167, 38, 0.3);
    border-radius: 6px;
    color: var(--brand-orange);
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: 'Inter', sans-serif;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.tree-action-btn:hover {
    background: rgba(255, 167, 38, 0.2);
    border-color: var(--brand-orange);
}

/* Tree Container */
.tree-container {
    flex: 1;
    overflow-y: auto;
    padding: 0.75rem 1rem;
}

/* Tree Node */
.tree-node {
    margin: 0.25rem 0;
    user-select: none;
}

.tree-node-content {
    display: flex;
    align-items: center;
    padding: 0.5rem 0.75rem;
    cursor: pointer;
    border-radius: 6px;
    transition: all 0.2s ease;
    user-select: none;
}

.tree-node-content:hover {
    background: rgba(255, 167, 38, 0.15);
    transform: translateX(2px);
}

.tree-node-content.selected {
    background: linear-gradient(90deg, rgba(255, 167, 38, 0.25) 0%, rgba(255, 167, 38, 0.1) 100%);
    border-left: 4px solid #ffa726;
    padding-left: calc(0.75rem - 4px); /* Compensate for border - exact match to 6087 */
    box-shadow: 0 2px 8px rgba(255, 167, 38, 0.2);
}

/* Click ripple effect */
.tree-node-content.ripple {
    position: relative;
    overflow: hidden;
    animation: ripple 0.6s ease-out;
}

@keyframes ripple {
    0% {
        box-shadow: 0 0 0 0 rgba(255, 167, 38, 0.4);
    }
    100% {
        box-shadow: 0 0 0 20px rgba(255, 167, 38, 0);
    }
}

.tree-node-toggle {
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 0.5rem;
    font-size: 0.8rem;
    color: var(--brand-orange);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    will-change: transform;
}

.tree-node-toggle.expanded {
    transform: rotate(90deg);
}

.tree-node-toggle.hidden {
    visibility: hidden;
}

.tree-node-toggle:hover {
    color: var(--brand-orange-hover);
    transform: scale(1.2);
}

.tree-node-toggle.expanded:hover {
    transform: rotate(90deg) scale(1.2);
}

.tree-node-icon {
    margin-right: 0.5rem;
    font-size: 16px;
    transition: transform 0.2s ease;
}

.tree-node-content:hover .tree-node-icon {
    transform: scale(1.1);
}

.tree-node-label {
    flex: 1;
    font-size: 0.9rem;
    color: var(--text-primary);
    font-weight: 500;
    user-select: none;
}

.tree-node-type {
    font-size: 0.75rem;
    color: #999;
    background: rgba(255, 167, 38, 0.1);
    padding: 0.15rem 0.5rem;
    border-radius: 4px;
    margin-left: 0.5rem;
    font-weight: 500;
    user-select: none;
    transition: all 0.2s ease;
}

.tree-node-content:hover .tree-node-type {
    background: rgba(255, 167, 38, 0.2);
    color: var(--brand-orange);
}

.tree-node-children {
    margin-left: 1.5rem;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.tree-node-children.expanded {
    max-height: 5000px;
}

/* Header Button States */
.graph-view-btn.active {
    background: linear-gradient(135deg, var(--brand-orange) 0%, var(--brand-orange-dark) 100%);
    color: #1a1a1a;
    font-weight: 600;
}

/* Scrollbar for tree */
.tree-container::-webkit-scrollbar {
    width: 8px;
}

.tree-container::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.02);
}

.tree-container::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
}

.tree-container::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* Document Details Overlay (appears over chat when tree node clicked) */
.node-details-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--bg-primary);
    z-index: 50;
    overflow-y: auto;
    padding: 1.25rem 1.5rem;  /* Tighter margins, left-aligned */
    opacity: 0;
    transition: opacity 0.2s ease;
}

.node-details-overlay.visible {
    opacity: 1;
}

.node-details {
    max-width: 100%;
    margin: 0;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.back-to-chat-btn {
    background: rgba(255, 167, 38, 0.1);
    border: 1px solid rgba(255, 167, 38, 0.3);
    color: var(--brand-orange);
    padding: 0.4rem 0.75rem;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.8rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    transition: all 0.2s ease;
    font-family: 'Inter', sans-serif;
}

.back-to-chat-btn:hover {
    background: rgba(255, 167, 38, 0.25);
    border-color: var(--brand-orange);
}

.node-title {
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--brand-orange);
    margin-bottom: 0.25rem;
    line-height: 1.3;
}

.node-id {
    font-size: 0.75rem;
    color: var(--text-tertiary);
    font-family: 'JetBrains Mono', monospace;
    margin-bottom: 0.75rem;
}

.node-description {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 1rem;
    padding: 0.75rem 1rem;
    background: rgba(255, 167, 38, 0.08);
    border-radius: 6px;
    border-left: 3px solid var(--brand-orange);
}

.node-meta {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.35rem 0.5rem;
    margin-bottom: 0.85rem;
}

.meta-item {
    background: rgba(255, 167, 38, 0.05);
    padding: 0.35rem 0.5rem;
    border-radius: 4px;
    border: 1px solid rgba(255, 167, 38, 0.1);
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.meta-item.full-width {
    grid-column: 1 / -1;
}

.meta-label {
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    color: #999;
    font-weight: 500;
}

.meta-value {
    font-size: 0.85rem;
    color: var(--text-primary);
    font-weight: 500;
}

.meta-value.clickable {
    color: var(--brand-orange);
    cursor: pointer;
    text-decoration: underline;
}

.meta-value.file-path {
    font-family: 'JetBrains Mono', monospace;
    font-size: 12px;
    color: var(--text-secondary);
    word-break: break-all;
}

.node-section {
    margin-bottom: 0.85rem;
}

.node-section-title {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--brand-orange);
    margin-bottom: 0.4rem;
}

.children-list {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.child-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.5rem 0.65rem;
    background: rgba(255, 167, 38, 0.05);
    border: 1px solid rgba(255, 167, 38, 0.1);
    border-radius: 4px;
    transition: all 0.2s ease;
}

.child-item:hover {
    background: rgba(255, 167, 38, 0.1);
    border-color: rgba(255, 167, 38, 0.2);
}

.child-item-main {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
    cursor: pointer;
}

.child-icon {
    font-size: 14px;
}

.child-name {
    font-size: 0.85rem;
    color: var(--text-primary);
    font-weight: 500;
}

.child-type {
    font-size: 0.7rem;
    text-transform: uppercase;
    color: var(--text-tertiary);
    font-family: 'JetBrains Mono', monospace;
}

.child-quick-view {
    background: var(--brand-orange);
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.child-quick-view:hover {
    background: var(--brand-orange-hover);
    transform: translateY(-2px);
}

.show-more-btn {
    width: 100%;
    padding: 10px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px dashed var(--border-color);
    color: var(--text-secondary);
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
    margin-top: 8px;
    transition: all 0.2s ease;
}

.show-more-btn:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
}

.node-content-section {
    margin-bottom: 24px;
}

.content-preview {
    background: rgba(255, 167, 38, 0.05);
    padding: 0.65rem 0.75rem;
    border-radius: 6px;
    border: 1px solid rgba(255, 167, 38, 0.1);
    font-size: 0.8rem;
    line-height: 1.5;
    color: var(--text-primary);
    max-height: 300px;
    overflow-y: auto;
}

.view-full-doc-btn {
    width: 100%;
    padding: 12px;
    background: linear-gradient(135deg, var(--brand-orange) 0%, var(--brand-orange-dark) 100%);
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    margin-top: 12px;
    transition: all 0.2s ease;
}

.view-full-doc-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 167, 38, 0.4);
}

/* Depth-based visual hierarchy (match port 6087) */
.tree-node[data-depth="0"] .tree-node-content {
    font-size: 1rem;
}

.tree-node[data-depth="1"] .tree-node-content {
    font-size: 0.95rem;
}

.tree-node[data-depth="2"] .tree-node-content {
    font-size: 0.9rem;
}

.tree-node[data-depth="3"] .tree-node-content {
    font-size: 0.9rem;
}

/* Staggered fade-in animation for child nodes (match 6087) */
.tree-node-children.expanded > .tree-node {
    animation: fadeInChild 0.3s cubic-bezier(0.4, 0, 0.2, 1) backwards;
}

.tree-node-children.expanded > .tree-node:nth-child(1) { animation-delay: 0ms; }
.tree-node-children.expanded > .tree-node:nth-child(2) { animation-delay: 50ms; }
.tree-node-children.expanded > .tree-node:nth-child(3) { animation-delay: 100ms; }
.tree-node-children.expanded > .tree-node:nth-child(4) { animation-delay: 150ms; }
.tree-node-children.expanded > .tree-node:nth-child(5) { animation-delay: 200ms; }
.tree-node-children.expanded > .tree-node:nth-child(6) { animation-delay: 250ms; }
.tree-node-children.expanded > .tree-node:nth-child(n+7) { animation-delay: 300ms; }

@keyframes fadeInChild {
    from {
        opacity: 0;
        transform: translateX(-10px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Tree Quick-Add Button (for selecting documents for chat context) */
.tree-quick-add {
    opacity: 0;
    margin-left: auto;
    background: rgba(255, 167, 38, 0.1);
    border: 1px solid rgba(255, 167, 38, 0.3);
    border-radius: 4px;
    padding: 0.2rem 0.5rem;
    font-size: 0.8rem;
    color: #ffa726;
    cursor: pointer;
    transition: all 0.2s;
    font-weight: 600;
}

.tree-node-content:hover .tree-quick-add {
    opacity: 1;
}

.tree-quick-add:hover {
    background: rgba(255, 167, 38, 0.25);
    border-color: #ffa726;
    transform: scale(1.1);
}

.tree-node-content.selected-for-chat {
    background: rgba(255, 167, 38, 0.1);
    border-left: 3px solid rgba(255, 167, 38, 0.5);
    padding-left: calc(0.75rem - 3px);
}

.tree-node-content.selected-for-chat .tree-quick-add {
    opacity: 1;
    background: rgba(0, 170, 0, 0.2);
    border-color: rgba(0, 170, 0, 0.4);
    color: #00aa00;
}

.tree-node-content.selected-for-chat .tree-quick-add:hover {
    background: rgba(0, 170, 0, 0.3);
}

.tree-quick-add.inherited {
    opacity: 1;
    background: rgba(0, 170, 0, 0.1);
    border-color: rgba(0, 170, 0, 0.25);
    color: rgba(0, 170, 0, 0.6);
    cursor: default;
}

.tree-quick-add.inherited:hover {
    transform: none;
}

.tree-node-content.implicitly-included {
    opacity: 0.7;
}

/* Chat Context Section (shows selected documents) */
.chat-context-section {
    background: rgba(255, 167, 38, 0.08);
    border: 1px solid rgba(255, 167, 38, 0.2);
    border-radius: 6px;
    padding: 0.75rem 1rem;
    margin-bottom: 1rem;
}

.context-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.context-section-header h4 {
    font-size: 0.75rem;
    color: var(--brand-orange);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
    margin: 0;
}

.clear-all-btn {
    background: rgba(255, 167, 38, 0.1);
    border: 1px solid rgba(255, 167, 38, 0.3);
    color: var(--brand-orange);
    padding: 0.3rem 0.6rem;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.clear-all-btn:hover {
    background: rgba(255, 167, 38, 0.2);
    border-color: var(--brand-orange);
}

.selected-items-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.selected-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(255, 167, 38, 0.15);
    border: 1px solid rgba(255, 167, 38, 0.3);
    border-radius: 6px;
    padding: 0.4rem 0.6rem;
    font-size: 0.8rem;
}

.selected-item-icon {
    font-size: 0.9rem;
}

.selected-item-name {
    color: var(--text-primary);
    font-weight: 500;
}

.remove-item-btn {
    background: rgba(255, 167, 38, 0.2);
    border: 1px solid rgba(255, 167, 38, 0.4);
    border-radius: 50%;
    width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--brand-orange);
    font-size: 14px;
    font-weight: bold;
    transition: all 0.2s;
    padding: 0;
    line-height: 1;
}

.remove-item-btn:hover {
    background: rgba(255, 0, 0, 0.3);
    border-color: rgba(255, 0, 0, 0.5);
    color: #ff5555;
}

/* Topic Tags */
.node-topics {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
}

.topic-tag {
    background: rgba(255, 167, 38, 0.2);
    color: #ffa726;
    padding: 0.3rem 0.6rem;
    border-radius: 10px;
    font-size: 0.75rem;
    font-weight: 500;
}

/* Properties Grid */
.properties-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.35rem 0.5rem;
}

.property-item {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    padding: 0.35rem 0.5rem;
    background: rgba(255, 167, 38, 0.05);
    border-radius: 4px;
    font-size: 0.7rem;
    min-height: 26px;
}

.property-label {
    color: #ffa726;
    font-weight: 600;
    white-space: nowrap;
    font-size: 0.7rem;
}

.property-value {
    color: #d4d1c9;
    font-weight: 500;
    font-size: 0.7rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Node Actions (bottom buttons) */
.node-actions {
    display: flex;
    flex-direction: row;
    gap: 0.5rem;
    margin-top: 1.25rem;
}

.query-agent-btn {
    flex: 1;
    padding: 0.65rem 1rem;
    background: rgba(255, 167, 38, 0.1);
    border: 2px solid rgba(255, 167, 38, 0.4);
    border-radius: 6px;
    color: #ffa726;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.query-agent-btn:hover {
    background: rgba(255, 167, 38, 0.25);
    border-color: #ffa726;
    transform: translateY(-2px);
}

.query-agent-btn.added-to-chat {
    background: rgba(0, 170, 0, 0.2);
    border: 2px solid rgba(0, 170, 0, 0.4);
    color: #00aa00;
}

.query-agent-btn.added-to-chat:hover {
    background: rgba(0, 170, 0, 0.3);
}

.view-full-doc-btn {
    flex: 1;
    padding: 0.65rem 1rem;
    background: linear-gradient(135deg, #ffa726 0%, #ff8f00 100%);
    border: 2px solid transparent;
    border-radius: 6px;
    color: white;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.view-full-doc-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 167, 38, 0.4);
}

/* Help Text at Bottom of Details */
.node-help-text {
    margin-top: 1rem;
    padding-top: 0.75rem;
    border-top: 1px solid rgba(255, 167, 38, 0.1);
    font-size: 0.75rem;
    color: #999;
    text-align: center;
    font-style: italic;
}

/* Segmented Toggle Control for Documents/People */
.view-toggle-group {
    display: inline-flex;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 3px;
    margin-right: 12px;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.3);
}

.toggle-btn {
    padding: 8px 20px;
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-size: 11px;
    font-weight: 600;
    font-family: 'JetBrains Mono', monospace;
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0.0, 0.2, 1);
    border-radius: 6px;
    position: relative;
}

.toggle-btn:first-child {
    margin-right: 2px;
}

.toggle-btn.active {
    background: linear-gradient(135deg, var(--brand-orange) 0%, var(--brand-orange-dark) 100%);
    color: #1a1a1a;
    font-weight: 700;
    box-shadow: 0 2px 8px rgba(255, 167, 38, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.2);
    transform: translateY(0);
}

.toggle-btn:not(.active):hover {
    background: rgba(255, 167, 38, 0.1);
    color: var(--brand-orange);
}

.toggle-btn:active {
    transform: scale(0.98);
}

/* Full-Screen Document Viewer Overlay */
.document-viewer-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.95);
    z-index: 9999;
    display: none;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.document-viewer-overlay.visible {
    opacity: 1;
}

.document-viewer-container {
    width: 90%;
    max-width: 1200px;
    height: 90vh;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.8);
}

.doc-viewer-header {
    padding: 1.5rem 2rem;
    border-bottom: 1px solid var(--border-color);
    background: rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-shrink: 0;
}

.close-viewer-btn {
    background: rgba(255, 167, 38, 0.1);
    border: 1px solid rgba(255, 167, 38, 0.3);
    color: var(--brand-orange);
    padding: 0.5rem 1rem;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.close-viewer-btn:hover {
    background: rgba(255, 167, 38, 0.25);
    border-color: var(--brand-orange);
}

.doc-viewer-header h2 {
    margin: 0;
    color: var(--brand-orange);
    font-size: 1.5rem;
    flex: 1;
}

.doc-file-path {
    font-size: 0.85rem;
    color: var(--text-tertiary);
    font-family: 'JetBrains Mono', monospace;
}

.doc-viewer-content {
    flex: 1;
    overflow-y: auto;
    padding: 2rem;
}

.doc-summary-box {
    background: rgba(255, 167, 38, 0.1);
    border-left: 3px solid var(--brand-orange);
    padding: 1rem 1.5rem;
    margin-bottom: 2rem;
    border-radius: 6px;
}

.doc-summary-box strong {
    color: var(--brand-orange);
}

.doc-full-content {
    color: var(--text-primary);
    line-height: 1.7;
}

.doc-full-content h1,
.doc-full-content h2,
.doc-full-content h3 {
    color: var(--brand-orange);
    margin-top: 2rem;
    margin-bottom: 1rem;
}

.doc-full-content h1 {
    font-size: 2rem;
}

.doc-full-content h2 {
    font-size: 1.5rem;
}

.doc-full-content p {
    margin-bottom: 1rem;
}

.doc-full-content ul,
.doc-full-content ol {
    margin: 1rem 0;
    padding-left: 2rem;
}

.doc-full-content li {
    margin: 0.5rem 0;
}

.doc-full-content blockquote {
    border-left: 3px solid var(--brand-orange);
    padding-left: 1.5rem;
    margin: 1.5rem 0;
    color: var(--text-secondary);
    font-style: italic;
}

.doc-full-content code {
    background: rgba(255, 167, 38, 0.1);
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    font-family: 'JetBrains Mono', monospace;
}

.doc-full-content strong {
    color: var(--brand-orange);
}

/* Scrollbar for document viewer */
.doc-viewer-content::-webkit-scrollbar {
    width: 10px;
}

.doc-viewer-content::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.02);
}

.doc-viewer-content::-webkit-scrollbar-thumb {
    background: rgba(255, 167, 38, 0.3);
    border-radius: 5px;
}

.doc-viewer-content::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 167, 38, 0.5);
}

/* Document Full Content Styling (in side overlay) */
.doc-file-path-display {
    font-size: 0.75rem;
    color: var(--text-tertiary);
    font-family: 'JetBrains Mono', monospace;
    margin-bottom: 1rem;
    padding: 0.5rem;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 4px;
}

.document-full-content {
    background: rgba(0, 0, 0, 0.2);
    padding: 1.5rem;
    border-radius: 6px;
    border: 1px solid var(--border-color-light);
    overflow-y: auto;
    max-height: 70vh;
}

.document-full-content h1,
.document-full-content h2,
.document-full-content h3 {
    color: var(--brand-orange);
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
}

.document-full-content h1 {
    font-size: 1.5rem;
}

.document-full-content h2 {
    font-size: 1.25rem;
    border-bottom: 1px solid var(--border-color-light);
    padding-bottom: 0.5rem;
}

.document-full-content h3 {
    font-size: 1.1rem;
}

.document-full-content p {
    margin: 0.75rem 0;
    line-height: 1.7;
    color: var(--text-primary);
}

.document-full-content ul,
.document-full-content ol {
    margin: 0.75rem 0;
    padding-left: 2rem;
}

.document-full-content li {
    margin: 0.5rem 0;
    line-height: 1.6;
}

.document-full-content blockquote {
    border-left: 3px solid var(--brand-orange);
    padding-left: 1.5rem;
    margin: 1rem 0;
    color: var(--text-secondary);
    font-style: italic;
}

.document-full-content strong {
    color: var(--brand-orange);
    font-weight: 600;
}

.document-full-content code {
    background: rgba(255, 167, 38, 0.1);
    padding: 0.2rem 0.5rem;
    border-radius: 3px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.9em;
}
