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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #1e1e1e;
    color: #cccccc;
    height: 100vh;
    overflow: hidden;
}

/* Main App Container */
.app-container {
    display: flex;
    height: 100vh;
    width: 100%;
}

/* Sidebar Styles */
.sidebar {
    width: 315px;
    min-width: 260px;
    max-width: 30vw;
    background: #252526;
    border-right: 1px solid #3c3c3c;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    position: relative;
}

.sidebar-header {
    padding: 16px;
    background: #252526;
    max-height: 100vh;
    overflow-y: auto;
}

.sidebar-header::-webkit-scrollbar {
    width: 6px;
}

.sidebar-header::-webkit-scrollbar-track {
    background: #252526;
}

.sidebar-header::-webkit-scrollbar-thumb {
    background: #3c3c3c;
    border-radius: 3px;
}

.sidebar-header::-webkit-scrollbar-thumb:hover {
    background: #4a4a4a;
}

.tool-name-wrapper {
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid #3c3c3c;
}

.tool-name {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.tool-name:hover {
    transform: translateX(2px);
}

.tool-icon {
    flex-shrink: 0;
    filter: drop-shadow(0 2px 4px rgba(139, 122, 184, 0.3));
    transition: filter 0.2s ease;
}

.tool-name:hover .tool-icon {
    filter: drop-shadow(0 2px 6px rgba(139, 122, 184, 0.5));
}

.tool-title {
    color: #ffffff;
    font-size: 24px;
    font-weight: 700;
    letter-spacing: 0.8px;
    background: linear-gradient(135deg, #ffffff 0%, #b8a8d8 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

/* Contact Buttons */
.contact-buttons {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.contact-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 6px 10px;
    background: rgba(139, 122, 184, 0.1);
    border: 1px solid rgba(139, 122, 184, 0.3);
    border-radius: 6px;
    color: #cccccc;
    text-decoration: none;
    font-size: 11px;
    transition: all 0.2s ease;
    cursor: pointer;
    flex: 1 1 120px;
    min-width: 0;
}

.contact-btn span {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-width: 0;
}

.contact-btn:hover {
    background: rgba(139, 122, 184, 0.2);
    border-color: #8b7ab8;
    color: #ffffff;
    transform: translateY(-2px);
}

.contact-btn svg {
    flex-shrink: 0;
    color: #8b7ab8;
}

.email-btn:hover svg {
    color: #10b981;
}

.meeting-btn:hover svg {
    color: #3b82f6;
}

/* User Info Section */
.user-info-section {
    background: #1a1a22;
    border: 1px solid #5a7fb8;
    border-radius: 8px;
    padding: 12px;
    margin-bottom: 20px;
}

.user-info-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(139, 122, 184, 0.2);
}

.user-info-header svg {
    color: #8b7ab8;
    flex-shrink: 0;
}

.user-name {
    flex: 1;
    color: #ffffff;
    font-size: 13px;
    font-weight: 500;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.logout-button {
    width: 24px;
    height: 24px;
    background: transparent;
    border: 1px solid #3c3c3c;
    border-radius: 4px;
    color: #999999;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.logout-button:hover {
    background: #f48771;
    border-color: #f48771;
    color: #ffffff;
    transform: translateY(-1px);
}

.logout-button:active {
    transform: translateY(0);
}

.usage-stats {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.usage-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 11px;
}

.usage-label {
    color: #999999;
    font-weight: 400;
}

.usage-value {
    color: #8b7ab8;
    font-weight: 600;
    font-family: 'Consolas', 'Courier New', monospace;
    background: rgba(139, 122, 184, 0.1);
    padding: 2px 6px;
    border-radius: 3px;
}

/* Config Sections */
.config-section {
    background: #1a1a1f;
    border: 1px solid #8b7ab8;
    border-radius: 8px;
    margin-bottom: 16px;
    overflow: visible;
    position: relative;
    box-shadow: 0 0 8px rgba(139, 122, 184, 0.15);
}

.section-header-with-collapse {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    background: #232329;
    border-bottom: 1px solid #3e3e42;
    cursor: pointer;
    transition: background 0.2s ease;
    border-radius: 7px 7px 0 0;
}

.config-section.collapsed .section-header-with-collapse {
    border-radius: 7px;
    border-bottom: none;
}

.section-header-with-collapse:hover {
    background: #2a2a32;
}

.collapse-icon {
    color: #8b7ab8;
    opacity: 0.8;
    flex-shrink: 0;
    transition: transform 0.2s ease;
}

.config-section.collapsed .collapse-icon {
    transform: rotate(-90deg);
}

.section-title {
    font-size: 13px;
    color: #ffffff;
    font-weight: 500;
    letter-spacing: 0.3px;
}

.section-content {
    padding: 16px;
    display: block;
    border-radius: 0 0 7px 7px;
}

.config-section.collapsed .section-content {
    display: none;
}

/* Custom Select Dropdown */
.custom-select {
    position: relative;
    width: 100%;
}

.select-trigger {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 12px;
    background: #2a2a32;
    border: 1px solid #404048;
    border-radius: 6px;
    cursor: pointer;
    font-size: 12px;
    color: #ffffff;
    transition: all 0.2s ease;
}

.select-trigger:hover {
    background: #33333d;
    border-color: #8b7ab8;
}

.select-trigger.active {
    border-color: #8b7ab8;
    background: #33333d;
}

.select-arrow {
    transition: transform 0.2s ease;
    opacity: 0.8;
    color: #8b7ab8;
}

.select-trigger.active .select-arrow {
    transform: rotate(180deg);
}

.select-options {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    background: #2a2a32;
    border: 1px solid #8b7ab8;
    border-radius: 6px;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.5);
    z-index: 1000;
    overflow: hidden;
}

.select-option {
    padding: 8px 12px;
    font-size: 12px;
    color: #ffffff;
    cursor: pointer;
    transition: all 0.15s ease;
}

.select-option:hover {
    background: #8b7ab8;
    color: #ffffff;
}

.select-option.selected {
    background: #6a5a98;
    color: #ffffff;
}

.upload-area {
    background: #22222a;
    border: 1.5px dashed #6a5a88;
    border-radius: 8px;
    padding: 16px 24px;
    text-align: center;
    transition: all 0.2s ease;
    position: relative;
}

.upload-area:hover {
    border-color: #8b7ab8;
    background: #28282f;
}

.upload-hint {
    color: #b0b0b0;
    font-size: 12px;
    margin-top: 12px;
    margin-bottom: 0;
    font-weight: 400;
}

.file-input {
    display: none;
}

.upload-options-menu {
    position: absolute;
    bottom: calc(100% + 4px);
    left: 50%;
    transform: translateX(-50%);
    background: #2a2a32;
    border: 1px solid #8b7ab8;
    border-radius: 6px;
    padding: 6px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
    z-index: 1000;
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 150px;
}

.upload-option {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background: transparent;
    border: none;
    border-radius: 4px;
    color: #ffffff;
    font-size: 12px;
    cursor: pointer;
    transition: background 0.2s ease;
    text-align: left;
}

.upload-option:hover {
    background: #8b7ab8;
}

.upload-option svg {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
}

#uploadFilesOption svg {
    color: #7cb9e8;
}

#uploadFolderOption svg {
    color: #d4a574;
}

.upload-main-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 8px 20px;
    background: linear-gradient(135deg, #8b7ab8 0%, #6a5a98 100%);
    color: #ffffff;
    border: none;
    border-radius: 6px;
    font-family: 'Inter', sans-serif;
    font-size: 13px;
    font-weight: 500;
    letter-spacing: 0.01em;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(139, 122, 184, 0.25);
}

.upload-main-button:hover {
    background: linear-gradient(135deg, #9d8acc 0%, #7b6aaa 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(139, 122, 184, 0.4);
}

.upload-main-button:active {
    transform: translateY(0);
    box-shadow: 0 2px 6px rgba(139, 122, 184, 0.3);
}

.upload-main-button svg {
    width: 14px;
    height: 14px;
}

.sidebar-content {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
}

.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    color: #858585;
    text-align: center;
}

.empty-state svg {
    margin-bottom: 16px;
    opacity: 0.5;
}

.empty-state p {
    font-size: 13px;
}

/* Uploaded Files Section */
.uploaded-files-section {
    margin-top: 16px;
    background: #1a1a22;
    border: 1px solid #5a7fb8;
    border-radius: 8px;
    overflow: hidden;
}

.uploaded-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px;
    background: #20202a;
    transition: background 0.2s ease;
}

.uploaded-header-left {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    flex: 1;
}

.uploaded-header-left:hover {
    opacity: 0.8;
}

.uploaded-collapse-icon {
    color: #8b7ab8;
    opacity: 0.8;
    flex-shrink: 0;
    transition: transform 0.2s ease;
}

.uploaded-files-section.collapsed .uploaded-collapse-icon {
    transform: rotate(-90deg);
}

.uploaded-title {
    font-size: 13px;
    color: #ffffff;
    font-weight: 500;
    letter-spacing: 0.3px;
}

.uploaded-content {
    padding: 12px 12px 20px 12px;
    background: #1a1a22;
    display: block;
    max-height: calc(100vh - 450px);
    overflow-y: auto;
    overflow-x: hidden;
}

.uploaded-files-section.collapsed .uploaded-content {
    display: none;
}

/* Custom scrollbar for uploaded content */
.uploaded-content::-webkit-scrollbar {
    width: 8px;
}

.uploaded-content::-webkit-scrollbar-track {
    background: #1a1a22;
}

.uploaded-content::-webkit-scrollbar-thumb {
    background: #3c3c3c;
    border-radius: 4px;
}

.uploaded-content::-webkit-scrollbar-thumb:hover {
    background: #4a4a4a;
}

/* File List Styles */
.file-list {
    padding: 0;
}

.file-item {
    padding: 4px 8px;
    margin-bottom: 0;
    background: transparent;
    border-radius: 3px;
    cursor: pointer;
    transition: background 0.15s ease;
    user-select: none;
    display: flex;
    align-items: center;
    min-width: 0;
}

.file-item:hover {
    background: #2a2d2e;
}

.file-item.active {
    background: #094771;
}

.folder-item {
    margin-bottom: 0;
    position: relative;
}

.folder-item::before {
    content: '';
    position: absolute;
    top: 20px;
    bottom: 0;
    width: 1px;
    background: #454545;
    pointer-events: none;
    left: var(--line-left, 16px);
}

.folder-item.collapsed::before {
    display: none;
}

.folder-header {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 4px 8px;
    cursor: pointer;
    border-radius: 3px;
    transition: background 0.15s ease;
    user-select: none;
    min-width: 0;
}

.folder-header:hover {
    background: #2a2d2e;
}

.folder-icon {
    font-size: 11px;
    transition: transform 0.2s ease;
    color: #cccccc;
    width: 16px;
    height: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.folder-icon::before {
    content: '›';
    font-size: 18px;
    font-weight: 300;
    line-height: 1;
}

.folder-item.collapsed .folder-icon::before {
    transform: rotate(0deg);
}

.folder-item:not(.collapsed) .folder-icon::before {
    transform: rotate(90deg);
    display: inline-block;
}

/* Folder name - slightly larger than file names */
.folder-name {
    font-size: 12.5px;
    font-weight: 500;
}

.folder-children {
    margin-left: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.folder-children.collapsed {
    max-height: 0;
}

/* File Type Icons - VSCode Symbols */
.file-icon {
    flex-shrink: 0;
    width: 16px;
    height: 16px;
    object-fit: contain;
    margin-right: 3px;
}

.file-icon.vscode-icon {
    filter: brightness(0.9);
}

/* C++ icon - purple color filter */
.file-icon.cpp-icon {
    filter: brightness(0.9) sepia(1) saturate(3) hue-rotate(240deg);
}

/* File name text - slightly smaller than icon */
.file-name {
    font-family: 'Inter', sans-serif;
    font-size: 12px;
    line-height: 16px;
    color: #cccccc;
    font-weight: 400;
    letter-spacing: 0.01em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex: 1;
    min-width: 0;
}

/* Makefile icon */
.file-icon.makefile {
    color: #e37933;
}

/* Proto file icon */
.file-icon.proto-file {
    color: #4285f4;
}

/* Python file icon */
.file-icon.py-file {
    color: #ffbc03;
}

/* Default file icon */
.file-icon.default-file {
    color: #858585;
}

/* Audit Request Page Styles */
/* Chat-style Audit Page */
.audit-request-page {
    display: flex;
    flex-direction: column;
    height: 100%;
    background: #1e1e1e;
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* Chat Input Container */
.chat-input-container {
    padding: 12px 24px;
    background: #252526;
    border-top: 1px solid #3c3c3c;
    display: flex;
    gap: 12px;
    align-items: center;
    justify-content: center;
    position: sticky;
    bottom: 0;
    z-index: 100;
    overflow: visible;
    flex-wrap: wrap;
}

.chat-input {
    flex: 1;
    min-height: 44px;
    max-height: 200px;
    padding: 12px 16px;
    background: #1e1e1e;
    border: 2px solid #4a90e2;
    border-radius: 8px;
    color: #ffffff;
    font-size: 15px;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-weight: 400;
    letter-spacing: 0.01em;
    resize: none;
    transition: all 0.2s ease;
    box-shadow: 0 0 0 3px rgba(74, 144, 226, 0.1);
    word-wrap: break-word;
    overflow-wrap: break-word;
    overflow-y: hidden;
    line-height: 1.5;
}

.chat-input:focus {
    outline: none;
    border-color: #5ba3ff;
    box-shadow: 0 0 0 3px rgba(74, 144, 226, 0.2);
}

.chat-input::placeholder {
    color: #6a6a6a;
    font-weight: 400;
    letter-spacing: 0.01em;
}

.chat-input:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    border-color: #3c3c3c;
}

.chat-submit-button {
    width: 44px;
    height: 44px;
    background: linear-gradient(135deg, #4a90e2 0%, #357abd 100%);
    border: none;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(74, 144, 226, 0.3);
}

.chat-submit-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(74, 144, 226, 0.5);
}

.chat-submit-button:active {
    transform: translateY(0);
}

.chat-submit-button:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    transform: none;
}

.chat-submit-button:disabled:hover {
    transform: none;
    box-shadow: 0 2px 8px rgba(74, 144, 226, 0.3);
}

.chat-submit-button svg {
    color: #ffffff;
}

/* Compact Model Select (in chat input area) */
.compact-model-select {
    position: relative;
    flex: 1 1 150px;
    min-width: 0;
    overflow: visible;
}

.compact-select-trigger {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px;
    background: #1e1e1e;
    border: 2px solid #5a7fb8;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    gap: 8px;
    height: 44px;
    overflow: hidden;
    width: 100%;
}

.compact-select-trigger span {
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-width: 0;
}

.compact-select-arrow {
    flex-shrink: 0;
}

/* API Key Settings Icon (Gear icon inside select trigger) */
.api-key-settings-icon {
    background: none;
    border: none;
    padding: 0;
    margin: 0;
    margin-right: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    flex-shrink: 0;
    position: relative;
}

.api-key-settings-icon svg {
    color: #ffffff;
    transition: all 0.3s ease;
}

.api-key-settings-icon:hover svg {
    color: #b8a8d8;
    transform: rotate(90deg);
}

/* Custom tooltip for settings icon */
.api-key-settings-icon::after {
    content: attr(data-tooltip);
    position: fixed;
    top: var(--tooltip-top, -100px);
    left: var(--tooltip-left, 50%);
    transform: translate(-50%, -100%);
    background: rgba(0, 0, 0, 0.95);
    color: #ffffff;
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 12px;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
    z-index: 9999999;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.4);
}

.api-key-settings-icon:hover::after {
    opacity: 1;
    transition-delay: 0.2s;
}

.compact-select-trigger:hover {
    background: #2d2d30;
    border-color: #6a8fc8;
}

.compact-select-trigger span {
    color: #ffffff;
    font-size: 13px;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.compact-select-arrow {
    color: #8b7ab8;
    opacity: 0.8;
    flex-shrink: 0;
    transition: transform 0.2s ease;
}

.compact-select-trigger:hover .compact-select-arrow {
    opacity: 1;
}

/* Auto selected styling - keep white color, no highlight */
.compact-select-trigger.auto-selected span {
    color: #ffffff;
    font-weight: 500;
}

.compact-select-options {
    position: absolute;
    bottom: calc(100% + 8px);
    left: 0;
    width: 100%;
    background: #1e1e1e;
    border: 1px solid #5a7fb8;
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
    overflow-y: auto;
    overflow-x: hidden;
    z-index: 1000;
}

.compact-select-option {
    padding: 10px 14px;
    color: #cccccc;
    font-size: 13px;
    cursor: pointer;
    transition: background 0.15s ease;
}

.compact-select-option:hover {
    background: #2d2d30;
    color: #ffffff;
}

.compact-select-option.selected {
    background: #094771;
    color: #ffffff;
}

/* Disabled option (coming soon) */
.compact-select-option.disabled {
    background: rgba(45, 45, 48, 0.3);
    color: #666666;
    cursor: not-allowed;
    opacity: 0.6;
}

.compact-select-option.disabled:hover {
    background: rgba(45, 45, 48, 0.4);
    color: #666666;
}

/* Highlighted disabled option (for special features) */
.compact-select-option.disabled.highlight-option {
    background: rgba(251, 191, 36, 0.08);
    color: #fbbf24;
    opacity: 0.85;
}

.compact-select-option.disabled.highlight-option:hover {
    background: rgba(251, 191, 36, 0.15);
    color: #fcd34d;
}

/* Coming soon tooltip */
.coming-soon-tooltip {
    position: fixed;
    background: #2d2d30;
    color: #fbbf24;
    padding: 6px 10px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 500;
    white-space: nowrap;
    z-index: 10000;
    pointer-events: none;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(251, 191, 36, 0.3);
}

/* Auto option - highlighted */
.compact-select-option.auto-option {
    background: rgba(139, 122, 184, 0.15);
    color: #c792ea;
    font-weight: 600;
    border-bottom: 1px solid rgba(139, 122, 184, 0.3);
    position: relative;
    overflow: visible;
}

.compact-select-option.auto-option:hover {
    background: rgba(139, 122, 184, 0.25);
    color: #d4a5f7;
}

.compact-select-option.auto-option.selected {
    background: rgba(139, 122, 184, 0.35);
    color: #ffffff;
}

/* Auto option description text */
.auto-description {
    font-size: 11px;
    font-weight: 400;
    color: #999999;
    margin-left: 4px;
}

.compact-select-option.auto-option:hover .auto-description {
    color: #aaaaaa;
}

.compact-select-option.auto-option.selected .auto-description {
    color: #cccccc;
}

/* Language Selector (Compact) - Similar to Model Selector */
.compact-language-select {
    position: relative;
    flex: 1 1 150px;
    min-width: 0;
    overflow: visible;
}

.compact-language-select .compact-select-trigger {
    border-color: #7fb85a;
}

.compact-language-select .compact-select-trigger:hover {
    border-color: #9fcc7a;
    background: #252526;
}

.compact-language-select .compact-select-options {
    border-color: #7fb85a;
    min-width: 150px;
}

/* Bug Type Selector (Compact) - Red Theme */
.compact-bugtype-select {
    position: relative;
    flex: 1 1 160px;
    min-width: 0;
    overflow: visible;
}

.compact-bugtype-select .compact-select-trigger {
    border-color: #d97070;
}

.compact-bugtype-select .compact-select-trigger:hover {
    border-color: #e89090;
    background: #252526;
}

.compact-bugtype-select .compact-select-options {
    border-color: #d97070;
    min-width: 160px;
}

/* Start Auditing Button */
.start-audit-button {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 12px 24px;
    background: linear-gradient(135deg, #8b7ab8 0%, #5a7fb8 100%);
    border: none;
    border-radius: 8px;
    color: #ffffff;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(139, 122, 184, 0.4);
    height: 44px;
    flex: 1 1 180px;
    min-width: 0;
}

.start-audit-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(139, 122, 184, 0.6);
    background: linear-gradient(135deg, #9d8ac8 0%, #6a8fc8 100%);
}

.start-audit-button:active {
    transform: translateY(0);
}

.start-audit-button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.start-audit-button svg {
    width: 18px;
    height: 18px;
}

/* Chat Message Bubbles */
.chat-message {
    display: flex;
    gap: 12px;
    max-width: 85%;
}

.chat-message.user {
    align-self: flex-end;
    flex-direction: row-reverse;
}

.chat-message.assistant {
    align-self: flex-start;
}

.message-content {
    background: #2d2d30;
    padding: 12px 16px;
    border-radius: 12px;
    color: #cccccc;
    font-size: 15px;
    line-height: 1.7;
    font-weight: 400;
    letter-spacing: 0.01em;
}

.chat-message.user .message-content {
    background: linear-gradient(135deg, #4a90e2 0%, #357abd 100%);
    color: #ffffff;
    font-weight: 500;
    box-shadow: 0 2px 12px rgba(74, 144, 226, 0.25);
}

.chat-message.assistant .message-content {
    background: #2d2d30;
}

/* Loading Spinner */
.message-loading {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: #999;
    font-weight: 400;
}

.spinner {
    width: 20px;
    height: 20px;
    border: 3px solid #3c3c3c;
    border-top-color: #4a90e2;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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

.message-log {
    font-family: 'Consolas', 'Courier New', monospace;
    font-size: 12px;
    color: #89e051;
    margin-top: 8px;
    padding: 8px 12px;
    background: #1a1a1a;
    border-radius: 6px;
    position: relative;
}

.message-log.collapsed {
    max-height: 0;
    overflow: hidden;
    padding: 0;
    margin-top: 0;
}

.log-toggle-button {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-top: 8px;
    padding: 4px 10px;
    background: #2a2a2a;
    border: 1px solid #3c3c3c;
    border-radius: 4px;
    color: #89e051;
    font-size: 11px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.log-toggle-button:hover {
    background: #333333;
    border-color: #89e051;
}

.log-toggle-button svg {
    width: 12px;
    height: 12px;
    transition: transform 0.2s ease;
}

.log-toggle-button.collapsed svg {
    transform: rotate(-90deg);
}

.log-toggle-button.collapsed {
    margin-top: 4px;
    padding: 2px 8px;
    font-size: 10px;
}

.log-toggle-button.collapsed svg {
    width: 10px;
    height: 10px;
}

.message-output {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid #3c3c3c;
    font-family: 'Inter', sans-serif;
    font-weight: 400;
    font-size: 15px;
    line-height: 1.8;
    color: #e8e8e8;
    letter-spacing: 0.01em;
}

.audit-request-container {
    width: 100%;
    max-width: 600px;
}

.audit-page-title {
    color: #ffffff;
    font-size: 28px;
    font-weight: 400;
    margin-bottom: 32px;
    text-align: center;
}

.input-section {
    margin-bottom: 24px;
}

.input-label {
    display: block;
    color: #cccccc;
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 10px;
}

.radio-group {
    display: flex;
    gap: 20px;
}

.radio-option-audit {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 14px;
    color: #cccccc;
    padding: 8px 16px;
    background: #252526;
    border: 1px solid #3c3c3c;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.radio-option-audit:hover {
    background: #2d2d30;
    border-color: #007acc;
}

.radio-option-audit input[type="radio"] {
    cursor: pointer;
    accent-color: #007acc;
}

.radio-option-audit input[type="radio"]:checked + span {
    color: #ffffff;
    font-weight: 600;
}

.audit-textarea {
    width: 100%;
    min-height: 80px;
    max-height: 300px;
    padding: 12px;
    background: #252526;
    border: 1px solid #3c3c3c;
    border-radius: 4px;
    color: #cccccc;
    font-size: 14px;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    resize: vertical;
    transition: border-color 0.2s ease;
}

.audit-textarea:focus {
    outline: none;
    border-color: #007acc;
}

.audit-textarea::placeholder {
    color: #858585;
}

.audit-textarea:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.error-message {
    color: #f48771;
    font-size: 13px;
    margin-bottom: 16px;
    padding: 8px 12px;
    background: rgba(244, 135, 113, 0.1);
    border: 1px solid #f48771;
    border-radius: 4px;
}

.execute-button {
    width: 100%;
    padding: 14px 24px;
    background: #0e639c;
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-top: 8px;
}

.execute-button:hover:not(:disabled) {
    background: #1177bb;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(14, 99, 156, 0.4);
}

.execute-button:active:not(:disabled) {
    transform: translateY(0);
}

.execute-button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Progress Section */
.progress-section {
    margin-top: 32px;
}

.progress-bar-container {
    width: 100%;
    height: 6px;
    background: #3c3c3c;
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 16px;
}

.progress-bar-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #0e639c, #1177bb);
    border-radius: 3px;
    transition: width 0.1s linear;
}

.log-output {
    background: #1e1e1e;
    border: 1px solid #3c3c3c;
    border-radius: 4px;
    padding: 16px;
    height: 200px;
    overflow-y: auto;
    overflow-x: hidden;
    font-family: 'Consolas', 'Courier New', monospace;
    font-size: 12px;
    color: #cccccc;
    line-height: 1.6;
}

.log-line {
    margin-bottom: 4px;
    color: #89e051;
}

.log-time {
    color: #858585;
    margin-right: 8px;
}

/* Upload Controls Disabled State */
.upload-controls.disabled {
    opacity: 0.4;
    pointer-events: none;
}

.upload-controls.disabled .upload-button {
    cursor: not-allowed;
}

.file-path {
    font-size: 11px;
    color: #858585;
    font-family: 'Consolas', 'Courier New', monospace;
    margin-top: 2px;
}

.file-size {
    font-size: 11px;
    color: #858585;
    margin-top: 2px;
}

/* Resizer Styles */
.resizer {
    width: 5px;
    background: #3c3c3c;
    cursor: col-resize;
    position: relative;
    transition: background 0.2s ease;
    flex-shrink: 0;
}

.resizer:hover {
    background: #007acc;
}

.resizer:active {
    background: #007acc;
}

/* Main Panel Styles */
.main-panel {
    flex: 1;
    background: #1e1e1e;
    display: flex;
    flex-direction: row;
    overflow: hidden;
    min-width: 0;
    position: relative;
}

/* Audit Panel (Left Half) */
.audit-panel {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    min-width: 0;
    border-right: 1px solid #3c3c3c;
}

/* Preview Panel (Right Half) */
.preview-panel {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    min-width: 0;
    background: #1e1e1e;
}

/* Tab Bar Styles */
.tab-bar {
    display: flex;
    align-items: center;
    background: #252526;
    border-bottom: 1px solid #3c3c3c;
    overflow-x: auto;
    overflow-y: hidden;
    flex-shrink: 0;
    height: 35px;
    z-index: 10;
}

.tab {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    background: transparent;
    border: none;
    border-right: 1px solid #3c3c3c;
    color: #969696;
    font-size: 13px;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.15s ease, color 0.15s ease;
    position: relative;
    min-width: 120px;
    max-width: 250px;
}

.tab:hover {
    background: #2d2d30;
}

.tab.active {
    background: #1e1e1e;
    color: #ffffff;
    border-bottom: 2px solid #007acc;
}

/* Special styling for Audit Request tab */
.tab[data-tab-type="audit"] .tab-label {
    font-weight: 600;
    background: linear-gradient(135deg, #8b7ab8 0%, #00d9ff 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: 0.3px;
}

.tab[data-tab-type="audit"].active .tab-label {
    background: linear-gradient(135deg, #9d8ac8 0%, #00e5ff 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.tab[data-tab-type="audit"]:hover .tab-label {
    background: linear-gradient(135deg, #a594d0 0%, #1ee9ff 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.tab-icon {
    flex-shrink: 0;
}

.tab-label {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.tab-close {
    flex-shrink: 0;
    width: 16px;
    height: 16px;
    border-radius: 3px;
    background: transparent;
    border: none;
    color: #969696;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    transition: background 0.15s ease, color 0.15s ease;
}

.tab-close:hover {
    background: #3e3e42;
    color: #ffffff;
}

.tab-close svg {
    width: 12px;
    height: 12px;
}

/* Page Content - All pages occupy remaining space below tab bar */
.page-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}
/* Welcome Screen */
.welcome-screen {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
    overflow-y: auto;
}

.welcome-content {
    text-align: center;
    max-width: 600px;
}

.welcome-content h2 {
    color: #ffffff;
    font-family: 'Space Grotesk', 'Inter', sans-serif;
    font-size: 36px;
    font-weight: 600;
    margin-bottom: 16px;
    letter-spacing: -0.02em;
}

.welcome-content > p {
    color: #cccccc;
    font-size: 16px;
    margin-bottom: 32px;
    font-weight: 400;
    line-height: 1.6;
}

.supported-formats {
    background: #252526;
    border: 1px solid #3c3c3c;
    border-radius: 6px;
    padding: 24px;
    text-align: left;
}

.supported-formats > p {
    color: #cccccc;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 12px;
}

.supported-formats ul {
    list-style: none;
    padding: 0;
}

.supported-formats li {
    color: #cccccc;
    font-size: 13px;
    padding: 4px 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.supported-formats .format-line {
    display: flex;
    align-items: center;
    gap: 0;
}

.supported-formats .format-line-indent {
    padding-left: 152px;
}

.supported-formats .format-label {
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
    font-weight: 500;
    color: #e8e8e8;
    margin-right: 12px;
    white-space: nowrap;
    min-width: 140px;
    letter-spacing: 0.2px;
}

.supported-formats .icon-group {
    display: inline-flex;
    align-items: center;
    gap: 0;
    margin-right: 20px;
}

.supported-formats .format-icon {
    width: 16px;
    height: 16px;
    margin-right: 4px;
    flex-shrink: 0;
}

.supported-formats code {
    background: #1e1e1e;
    color: #4ec9b0;
    padding: 2px 6px;
    border-radius: 3px;
    font-family: 'Consolas', 'Courier New', monospace;
    font-size: 12px;
    margin-right: 6px;
}

.supported-formats .icon-group code:last-child {
    margin-right: 0;
}

/* Code Viewer Styles */
.code-viewer {
    display: flex;
    flex-direction: column;
}

.code-content {
    flex: 1;
    overflow: auto;
    overflow-x: auto;
    overflow-y: auto;
    padding: 16px;
    margin: 0;
    background: #1e1e1e;
    color: #d4d4d4;
    font-family: 'Consolas', 'Courier New', monospace;
    font-size: 14px;
    line-height: 1.6;
    tab-size: 4;
}

.code-line {
    display: flex;
    min-width: fit-content;
}

.code-line-content {
    flex: 1;
    white-space: pre;
    overflow: visible;
}

/* Syntax Highlighting Styles (VSCode Dark+ theme) */
.syntax-keyword {
    color: #569cd6; /* Blue - keywords like class, public, private, if, for, etc. */
}

.syntax-type {
    color: #4ec9b0; /* Cyan - types like int, void, bool, std::string */
}

.syntax-function {
    color: #dcdcaa; /* Yellow - function names */
}

.syntax-string {
    color: #ce9178; /* Orange - strings */
}

.syntax-comment {
    color: #6a9955; /* Green - comments */
    font-style: italic;
}

.syntax-preprocessor {
    color: #9b9b9b; /* Gray - #include, #define, etc. */
}

.syntax-number {
    color: #b5cea8; /* Light green - numbers */
}

.syntax-operator {
    color: #d4d4d4; /* White - operators */
}

.syntax-namespace {
    color: #4ec9b0; /* Cyan - namespace names */
}

.syntax-class {
    color: #4ec9b0; /* Cyan - class names */
}

.syntax-macro {
    color: #c586c0; /* Purple - macros */
}

.syntax-variable {
    color: #9cdcfe; /* Light blue - variables */
}

.line-number {
    color: #858585;
    user-select: none;
    display: inline-block;
    min-width: 50px;
    text-align: right;
    padding-right: 16px;
    flex-shrink: 0;
}

/* Error Viewer Styles */
.error-viewer {
    position: fixed;
    top: 70%;
    left: 230px;
    transform: translateY(-50%);
    z-index: 10000;
    pointer-events: none;
}

.error-toast {
    display: flex;
    align-items: center;
    gap: 10px;
    background: #3c2020;
    border: 1px solid #f48771;
    border-radius: 5px;
    padding: 10px 14px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.6);
    pointer-events: none;
}

.error-toast svg {
    color: #f48771;
    flex-shrink: 0;
}

.error-message {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.error-message strong {
    color: #f48771;
    font-size: 12px;
    font-weight: 600;
}

.error-message span {
    color: #cccccc;
    font-size: 11px;
    line-height: 1.3;
}

/* Error toast fade out animation */
.error-viewer.fade-out {
    animation: fadeOut 0.5s ease forwards;
}

@keyframes fadeOut {
    from {
        opacity: 1;
    }
    to {
        opacity: 0;
    }
}

/* Scrollbar Styles */
::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: #1e1e1e;
}

::-webkit-scrollbar-thumb {
    background: #424242;
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: #4e4e4e;
}

::-webkit-scrollbar-corner {
    background: #1e1e1e;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.code-viewer,
.error-viewer {
    animation: fadeIn 0.2s ease;
}

/* ========================================
   File Selection Modal
   ======================================== */

.file-selection-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.file-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(4px);
}

.file-modal-content {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 700px;
    max-height: 85vh;
    background: #252526;
    border: 1px solid #3c3c3c;
    border-radius: 8px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.6);
    display: flex;
    flex-direction: column;
    animation: slideUp 0.3s ease;
}

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

.file-modal-header {
    padding: 20px 24px;
    border-bottom: 1px solid #3c3c3c;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.file-modal-header h2 {
    color: #ffffff;
    font-size: 18px;
    font-weight: 600;
    margin: 0;
}

.file-modal-close {
    width: 32px;
    height: 32px;
    background: transparent;
    border: 1px solid #3c3c3c;
    border-radius: 4px;
    color: #cccccc;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.file-modal-close:hover {
    background: #f48771;
    border-color: #f48771;
    color: #ffffff;
}

.file-modal-body {
    flex: 1;
    overflow-y: auto;
    padding: 20px 24px;
    min-height: 300px;
    max-height: 400px;
}

.file-modal-body::-webkit-scrollbar {
    width: 8px;
}

.file-modal-body::-webkit-scrollbar-track {
    background: #1e1e1e;
}

.file-modal-body::-webkit-scrollbar-thumb {
    background: #3c3c3c;
    border-radius: 4px;
}

.file-modal-body::-webkit-scrollbar-thumb:hover {
    background: #4a4a4a;
}

/* File Selection Tree - matching uploaded files style */
.file-selection-tree {
    color: #cccccc;
    padding: 0;
}

.file-selection-item {
    padding: 4px 8px;
    padding-left: 8px;
    margin-bottom: 0;
    background: transparent;
    border-radius: 3px;
    cursor: pointer;
    transition: background 0.15s ease;
    user-select: none;
    display: flex;
    align-items: center;
    min-width: 0;
}

.file-selection-item:hover {
    background: #2a2d2e;
}

.folder-selection-item {
    margin-bottom: 0;
    position: relative;
}

/* Vertical line for folder hierarchy */
.folder-selection-item::before {
    content: '';
    position: absolute;
    top: 28px;
    bottom: 0;
    width: 1px;
    background: #454545;
    pointer-events: none;
    left: var(--line-left, 17px);
}

.folder-selection-item.collapsed::before {
    display: none;
}

.folder-selection-header {
    display: flex;
    align-items: center;
    padding: 4px 8px;
    border-radius: 3px;
    cursor: pointer;
    transition: background 0.15s ease;
    user-select: none;
    min-width: 0;
}

.folder-selection-header:hover {
    background: #2a2d2e;
}

/* Checkboxes */
.file-checkbox,
.folder-checkbox {
    width: 18px;
    height: 18px;
    min-width: 18px;
    border: 2px solid #8b7ab8;
    border-radius: 3px;
    margin-right: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    transition: all 0.2s ease;
    cursor: pointer;
    flex-shrink: 0;
}

.file-checkbox.checked,
.folder-checkbox.checked {
    background: #8b7ab8;
    border-color: #8b7ab8;
}

.folder-checkbox.indeterminate {
    background: #6a5a98;
    border-color: #6a5a98;
}

.file-checkbox svg,
.folder-checkbox svg {
    width: 12px;
    height: 12px;
    color: #ffffff;
    display: none;
}

.file-checkbox.checked svg,
.folder-checkbox.checked svg {
    display: block;
}

/* Hide SVG when indeterminate */
.folder-checkbox.indeterminate svg {
    display: none;
}

/* Show dash for indeterminate state */
.folder-checkbox.indeterminate::after {
    content: '';
    width: 10px;
    height: 2px;
    background: #ffffff;
    display: block;
    border-radius: 1px;
}

/* Folder collapse icon - matching folder triangle */
.folder-icon-collapse {
    width: 12px;
    height: 12px;
    margin-right: 6px;
    color: #cccccc;
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 300;
    line-height: 1;
    transition: transform 0.2s ease;
}

.folder-icon-collapse::before {
    content: '▶';
    display: inline-block;
    transition: transform 0.2s ease;
}

.folder-selection-item:not(.collapsed) .folder-icon-collapse::before {
    transform: rotate(90deg);
}

.folder-selection-item.collapsed .folder-icon-collapse::before {
    transform: rotate(0deg);
}

.folder-selection-children {
    margin-left: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.folder-selection-item.collapsed .folder-selection-children {
    max-height: 0;
    display: none;
}

.selection-file-name {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: #cccccc;
    flex: 1;
    overflow: hidden;
}

.selection-file-name span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Modal Footer */
.file-modal-footer {
    padding: 20px 24px;
    border-top: 1px solid #3c3c3c;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.modal-language-section {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.modal-label {
    color: #ffffff;
    font-size: 13px;
    font-weight: 600;
}

.modal-language-options {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

.modal-radio-option {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    padding: 8px 12px;
    border: 1px solid #3c3c3c;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.modal-radio-option:hover {
    background: #2d2d30;
    border-color: #8b7ab8;
}

.modal-radio-option input[type="radio"] {
    display: none;
}

.radio-custom {
    width: 16px;
    height: 16px;
    border: 2px solid #8b7ab8;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.modal-radio-option input[type="radio"]:checked + .radio-custom {
    border-color: #8b7ab8;
    background: #8b7ab8;
}

.modal-radio-option input[type="radio"]:checked + .radio-custom::after {
    content: '';
    width: 6px;
    height: 6px;
    background: #ffffff;
    border-radius: 50%;
}

.radio-label {
    color: #cccccc;
    font-size: 13px;
    font-weight: 500;
}

.modal-radio-option input[type="radio"]:checked ~ .radio-label {
    color: #ffffff;
}

.modal-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
}

.modal-button {
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.modal-button-cancel {
    background: transparent;
    border: 1px solid #3c3c3c;
    color: #cccccc;
}

.modal-button-cancel:hover {
    background: #2d2d30;
    border-color: #4a4a4a;
}

.modal-button-confirm {
    background: linear-gradient(135deg, #8b7ab8 0%, #6a5a98 100%);
    color: #ffffff;
    box-shadow: 0 2px 8px rgba(139, 122, 184, 0.3);
}

.modal-button-confirm:hover {
    background: linear-gradient(135deg, #9d8acc 0%, #7b6aaa 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(139, 122, 184, 0.5);
}

.modal-button-confirm:active {
    transform: translateY(0);
}

/* API Key Modal */
.api-key-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 10001;
    display: flex;
    align-items: center;
    justify-content: center;
}

.api-key-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
}

.api-key-modal-content {
    position: relative;
    background: #1e1e1e;
    border: 1px solid #5a7fb8;
    border-radius: 12px;
    width: 90%;
    max-width: 480px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
    animation: slideUp 0.3s ease-out;
    z-index: 1;
}

.api-key-modal-wide {
    max-width: 560px;
}

.api-key-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    border-bottom: 1px solid #3c3c3c;
}

.api-key-modal-header h2 {
    font-size: 18px;
    font-weight: 600;
    color: #ffffff;
    margin: 0;
}

.api-key-modal-close {
    width: 32px;
    height: 32px;
    background: transparent;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    color: #cccccc;
}

.api-key-modal-close:hover {
    background: #2d2d30;
    color: #ffffff;
}

.api-key-modal-body {
    padding: 24px;
}

.api-key-modal-description {
    color: #cccccc;
    font-size: 14px;
    line-height: 1.6;
    margin: 0 0 20px 0;
}

/* Provider Section */
.api-key-provider-section {
    margin-bottom: 20px;
}

.api-key-provider-section:last-of-type {
    margin-bottom: 0;
}

.api-key-label {
    display: flex;
    align-items: baseline;
    gap: 8px;
    margin-bottom: 8px;
}

.provider-name {
    font-size: 14px;
    font-weight: 600;
    color: #ffffff;
}

.provider-hint {
    font-size: 12px;
    color: #8b7ab8;
    font-weight: 400;
}

.api-key-input-group {
    position: relative;
    display: flex;
    align-items: center;
}

.api-key-input {
    flex: 1;
    padding: 12px 48px 12px 16px;
    background: #252526;
    border: 2px solid #5a7fb8;
    border-radius: 8px;
    color: #ffffff;
    font-size: 14px;
    font-family: 'Monaco', 'Courier New', monospace;
    transition: all 0.2s ease;
}

.api-key-input:focus {
    outline: none;
    border-color: #8b7ab8;
    box-shadow: 0 0 0 3px rgba(139, 122, 184, 0.2);
}

.api-key-input::placeholder {
    color: #6a6a6a;
}

.api-key-toggle {
    position: absolute;
    right: 12px;
    width: 32px;
    height: 32px;
    background: transparent;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    color: #8b7ab8;
}

.api-key-toggle:hover {
    background: rgba(139, 122, 184, 0.1);
    color: #9d8ac8;
}

.api-key-status {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 12px;
    padding: 10px 14px;
    border-radius: 6px;
    font-size: 13px;
}

.api-key-status.success {
    background: rgba(0, 200, 100, 0.1);
    border: 1px solid rgba(0, 200, 100, 0.3);
    color: #00ff88;
}

.api-key-status.error {
    background: rgba(255, 70, 70, 0.1);
    border: 1px solid rgba(255, 70, 70, 0.3);
    color: #ff6b6b;
}

.api-key-status.info {
    background: rgba(74, 144, 226, 0.1);
    border: 1px solid rgba(74, 144, 226, 0.3);
    color: #4a90e2;
}

.api-key-status .status-icon {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

.api-key-modal-footer {
    display: flex;
    gap: 12px;
    padding: 20px 24px;
    border-top: 1px solid #3c3c3c;
    justify-content: flex-end;
}

.api-key-button {
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.api-key-button-cancel {
    background: transparent;
    border: 1px solid #5a7fb8;
    color: #cccccc;
}

.api-key-button-cancel:hover {
    background: #2d2d30;
    color: #ffffff;
}

.api-key-button-submit {
    background: linear-gradient(135deg, #8b7ab8 0%, #6a5a98 100%);
    color: #ffffff;
    box-shadow: 0 2px 8px rgba(139, 122, 184, 0.3);
}

.api-key-button-submit:hover {
    background: linear-gradient(135deg, #9d8ac8 0%, #7b6aaa 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(139, 122, 184, 0.5);
}

.api-key-button-submit:active {
    transform: translateY(0);
}

.api-key-button-submit:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.button-spinner {
    animation: spin 1s linear infinite;
}

.button-spinner svg {
    width: 16px;
    height: 16px;
}

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

/* ========================================
   Audit Results Display
   ======================================== */

/* Issue message specific styling */
.summary-message {
    width: 95%;
    align-self: flex-start;
}

.summary-content {
    background: #2d2d30;
    padding: 12px 16px;
    border-radius: 12px;
    color: #cccccc;
}

.issue-message {
    width: 95%;
    align-self: flex-start;
    cursor: pointer;
    transition: all 0.2s ease;
}

.issue-message:hover:not(.selected-issue) {
    transform: translateX(2px);
}

.issue-content {
    background: #2d2d30;
    padding: 12px 16px;
    border-radius: 12px;
    color: #cccccc;
    border: 2px solid transparent;
    transition: all 0.2s ease;
}

.issue-message.selected-issue {
    cursor: default;
}

.issue-message.selected-issue .issue-content {
    border-color: #fbbf24;
    box-shadow: 0 0 0 1px rgba(251, 191, 36, 0.2), 0 4px 12px rgba(251, 191, 36, 0.15);
    background: rgba(45, 45, 48, 0.95);
}

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

.issue-badge {
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.issue-badge.npd {
    background: rgba(239, 68, 68, 0.15);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.issue-badge.unknown {
    background: rgba(156, 163, 175, 0.15);
    color: #9ca3af;
    border: 1px solid rgba(156, 163, 175, 0.3);
}

.issue-id {
    font-size: 15px;
    color: #f3f4f6;
    font-weight: 600;
    letter-spacing: 0.3px;
}

.issue-explanation {
    margin: 16px 0;
    padding: 16px;
    background: rgba(59, 130, 246, 0.05);
    border-left: 3px solid #3b82f6;
    border-radius: 4px;
}

.issue-explanation h4 {
    margin: 0 0 8px 0;
    font-size: 13px;
    font-weight: 600;
    color: #3b82f6;
}

.issue-explanation p {
    margin: 0;
    font-size: 13px;
    line-height: 1.6;
    color: #d1d5db;
}

.issue-details,
.issue-locations,
.issue-tips {
    margin: 12px 0;
}

.issue-details h4,
.issue-locations h4,
.issue-tips h4 {
    margin: 0 0 8px 0;
    font-size: 12px;
    font-weight: 600;
    color: #9ca3af;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.issue-details code {
    display: block;
    padding: 8px 12px;
    background: rgba(17, 24, 39, 0.5);
    border-radius: 4px;
    font-family: 'Monaco', 'Courier New', monospace;
    font-size: 12px;
    color: #10b981;
    overflow-x: auto;
}

.issue-locations ul,
.issue-tips ul {
    margin: 0;
    padding-left: 20px;
}

.issue-locations li,
.issue-tips li {
    font-size: 12px;
    line-height: 1.8;
    color: #d1d5db;
}

.audit-summary {
    margin-top: 12px;
    padding: 12px;
    background: rgba(16, 185, 129, 0.05);
    border-radius: 4px;
}

.audit-summary p {
    margin: 6px 0;
    font-size: 13px;
    color: #d1d5db;
}

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

.message-header svg {
    color: #10b981;
}

.message-header strong {
    font-size: 14px;
    color: #10b981;
}

/* ========================================
   Progress Display in Chat
   ======================================== */

/* Progress Message - Premium Design */
.progress-message {
    width: 95%;
    align-self: flex-start;
    animation: slideInUp 0.3s ease;
}

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

.progress-content {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.08) 0%, rgba(5, 150, 105, 0.05) 100%);
    border: 1px solid rgba(16, 185, 129, 0.2);
    padding: 20px;
    border-radius: 16px;
    color: #cccccc;
    box-shadow: 0 4px 20px rgba(16, 185, 129, 0.1);
    backdrop-filter: blur(10px);
}

/* Progress Header */
.progress-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}

.progress-header-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.progress-spinner {
    color: #10b981;
    flex-shrink: 0;
}

.progress-title {
    font-size: 15px;
    font-weight: 600;
    color: #10b981;
    letter-spacing: -0.02em;
}

.progress-percentage-badge {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: #ffffff;
    font-size: 13px;
    font-weight: 700;
    padding: 6px 14px;
    border-radius: 20px;
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.3);
    font-variant-numeric: tabular-nums;
}

/* Progress Main Content */
.progress-main {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* Progress Bar Section */
.progress-bar-wrapper {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.progress-bar-track {
    width: 100%;
    height: 10px;
    background: rgba(16, 185, 129, 0.1);
    border-radius: 10px;
    overflow: hidden;
    position: relative;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.2);
}

.progress-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #10b981 0%, #059669 50%, #047857 100%);
    background-size: 200% 100%;
    transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 0 12px rgba(16, 185, 129, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.2);
    position: relative;
    border-radius: 10px;
    animation: shimmerFlow 2s linear infinite;
}

@keyframes shimmerFlow {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

.progress-bar-shimmer {
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
    0% {
        left: -100%;
    }
    100% {
        left: 100%;
    }
}

.progress-bar-labels {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
    gap: 12px;
}

.progress-current-step {
    color: #d1fae5;
    font-weight: 500;
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.progress-step-count {
    color: #6ee7b7;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    flex-shrink: 0;
}

/* Progress Stats Grid */
.progress-stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}

.progress-stat-card {
    background: rgba(16, 185, 129, 0.08);
    border: 1px solid rgba(16, 185, 129, 0.15);
    border-radius: 12px;
    padding: 12px;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: all 0.2s ease;
}

.progress-stat-card:hover {
    background: rgba(16, 185, 129, 0.12);
    border-color: rgba(16, 185, 129, 0.25);
    transform: translateY(-1px);
}

.progress-stat-card svg {
    color: #10b981;
    flex-shrink: 0;
}

.progress-stat-content {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.progress-stat-label {
    font-size: 10px;
    font-weight: 500;
    color: #6ee7b7;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.progress-stat-value {
    font-size: 13px;
    font-weight: 600;
    color: #d1fae5;
    font-variant-numeric: tabular-nums;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .progress-stats-grid {
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .progress-stat-card {
        padding: 10px;
    }
}

/* Preview Welcome Placeholder */
.preview-welcome {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #1e1e1e;
}

.preview-welcome-content {
    text-align: center;
    color: #858585;
}

.preview-welcome-content svg {
    color: #505050;
    margin-bottom: 20px;
    opacity: 0.6;
}

.preview-welcome-content h3 {
    font-size: 18px;
    font-weight: 500;
    color: #858585;
    margin-bottom: 8px;
}

.preview-welcome-content p {
    font-size: 13px;
    color: #6e6e6e;
    max-width: 300px;
    line-height: 1.5;
}

/* File Tree Selection - Highlight Style (No Checkboxes) */
.file-checkbox-container {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
}

/* Hide checkbox completely */
.file-checkbox {
    display: none;
}

/* File item selected state - highlight background with left accent */
.file-item.selected {
    background: rgba(139, 122, 184, 0.15);
    border-left: 3px solid #8b7ab8;
    padding-left: 5px;
}

.file-item.selected .file-label {
    color: #e0e0e0;
}

/* Preview active state - overlays on top of selected state (higher specificity) */
.file-item.active {
    background: #094771 !important;
    border-left: none !important;
    padding-left: 8px !important;
}

.file-item.active .file-label {
    color: #ffffff !important;
}

/* When file is both selected and active (previewing a selected file) - keep the purple border */
.file-item.selected.active {
    background: #094771 !important;
    border-left: 3px solid #8b7ab8 !important;
    padding-left: 5px !important;
}

.file-item.selected.active .file-label {
    color: #ffffff !important;
}

/* Folder header selected state (all children selected) */
.folder-header.selected {
    background: rgba(139, 122, 184, 0.15);
    border-left: 3px solid #8b7ab8;
    padding-left: 5px;
}

.folder-header.selected .file-label {
    color: #e0e0e0;
}

/* Folder partial selection state (some children selected) */
.folder-header.partial-selected {
    background: rgba(90, 127, 184, 0.08);
    border-left: 3px solid #5a7fb8;
    padding-left: 5px;
}

.folder-header.partial-selected .file-label {
    color: #d0d0d0;
}

/* File label layout */
.file-label {
    flex: 1;
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 3px;
    transition: color 0.15s ease;
}

/* Select Mode Toggle Button */
.select-mode-toggle {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    background: transparent;
    border: 1.5px solid #6e6e6e;
    border-radius: 4px;
    color: #cccccc;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.select-mode-toggle:hover {
    border-color: #8b7ab8;
    background: rgba(139, 122, 184, 0.1);
    color: #e0e0e0;
}

.select-mode-toggle.active {
    background: #8b7ab8;
    border-color: #8b7ab8;
    color: #ffffff;
}

.select-mode-toggle svg {
    flex-shrink: 0;
}

/* Selection mode - keep uploaded files section unchanged, just ensure it's fully visible */
body.selection-mode .uploaded-files-section {
    opacity: 1 !important;
    pointer-events: auto !important;
    position: relative;
    z-index: 1;
}

body.selection-mode .file-item,
body.selection-mode .folder-header {
    cursor: pointer;
}

body.selection-mode .file-item:hover,
body.selection-mode .folder-header:hover {
    background: rgba(139, 122, 184, 0.08);
}

/* Preview mode - different cursor */
body:not(.selection-mode) .file-item {
    cursor: default;
}

body:not(.selection-mode) .file-item:hover {
    background: #2a2d2e;
}

/* Selection mode - dim and disable other areas */
body.selection-mode .main-panel {
    opacity: 0.3;
    pointer-events: none;
}

/* ========================================
   Free Trial Modal
   ======================================== */

.free-trial-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 10002;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    animation: fadeIn 0.3s ease;
}

.free-trial-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(8px);
}

.free-trial-content {
    position: relative;
    background: linear-gradient(135deg, #1e1e1e 0%, #2a2a2f 100%);
    border: 2px solid #8b7ab8;
    border-radius: 16px;
    width: 100%;
    max-width: 680px;
    max-height: 90vh;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(139, 122, 184, 0.4), 0 0 0 1px rgba(139, 122, 184, 0.2);
    animation: slideUp 0.4s ease;
    display: flex;
    flex-direction: column;
}

.free-trial-header {
    background: linear-gradient(135deg, #8b7ab8 0%, #6a5a98 100%);
    padding: 20px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.trial-badge {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #ffffff;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 1px;
}

.trial-badge svg {
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.1); opacity: 0.8; }
}

.free-trial-close {
    width: 32px;
    height: 32px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 6px;
    color: #ffffff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.free-trial-close:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: rotate(90deg);
}

.free-trial-body {
    flex: 1;
    overflow-y: auto;
    padding: 32px 24px;
}

.free-trial-body::-webkit-scrollbar {
    width: 8px;
}

.free-trial-body::-webkit-scrollbar-track {
    background: #1e1e1e;
}

.free-trial-body::-webkit-scrollbar-thumb {
    background: #8b7ab8;
    border-radius: 4px;
}

.free-trial-body h2 {
    font-size: 28px;
    font-weight: 700;
    color: #ffffff;
    margin: 0 0 12px 0;
    text-align: center;
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Segoe UI', sans-serif;
}

.trial-subtitle {
    text-align: center;
    color: #cccccc;
    font-size: 15px;
    margin: 0 0 32px 0;
}

.trial-subtitle strong {
    color: #f59e0b;
    font-weight: 600;
}

.free-trial-body h3 {
    font-size: 18px;
    font-weight: 600;
    color: #ffffff;
    margin: 0 0 16px 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.free-trial-body h3 svg {
    color: #8b7ab8;
    flex-shrink: 0;
}

.trial-limitations {
    background: rgba(139, 122, 184, 0.1);
    border: 1px solid rgba(139, 122, 184, 0.3);
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 28px;
}

.capabilities-subtitle {
    color: #cccccc;
    font-size: 14px;
    margin: 8px 0 0 0;
    font-style: normal;
}

.limitation-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
    margin-top: 16px;
}

.limitation-item {
    display: flex;
    align-items: center;
    gap: 12px;
    color: #e0e0e0;
    font-size: 14px;
}

.limitation-item svg {
    color: #10b981;
    flex-shrink: 0;
}

.limitation-item strong {
    color: #ffffff;
}

.trial-upgrade {
    background: rgba(59, 130, 246, 0.08);
    border: 1px solid rgba(59, 130, 246, 0.2);
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 28px;
}

.trial-upgrade p {
    color: #cccccc;
    font-size: 14px;
    margin: 0 0 16px 0;
}

.upgrade-features {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.upgrade-features li {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    color: #e0e0e0;
    font-size: 14px;
    line-height: 1.6;
}

.upgrade-features li svg {
    color: #3b82f6;
    flex-shrink: 0;
    margin-top: 2px;
}

.upgrade-features li strong {
    color: #ffffff;
}

.upgrade-features .highlight-text {
    color: #fbbf24;
    font-weight: 600;
    padding: 0;
    margin: 0;
    display: inline;
}

.trial-contact {
    background: rgba(16, 185, 129, 0.08);
    border: 1px solid rgba(16, 185, 129, 0.2);
    border-radius: 12px;
    padding: 24px;
}

.trial-contact p {
    color: #cccccc;
    font-size: 14px;
    margin: 0 0 20px 0;
}

.contact-options {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
}

.contact-option {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px 20px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    text-decoration: none;
    transition: all 0.3s ease;
}

.contact-option:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: #8b7ab8;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(139, 122, 184, 0.3);
}

.contact-option svg {
    color: #8b7ab8;
    flex-shrink: 0;
}

.contact-option div {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.contact-option strong {
    color: #ffffff;
    font-size: 14px;
    font-weight: 600;
}

.contact-option span {
    color: #a0a0a0;
    font-size: 13px;
    font-family: 'Monaco', 'Courier New', monospace;
}

.email-option:hover svg {
    color: #10b981;
}

.meeting-option:hover svg {
    color: #3b82f6;
}

.free-trial-footer {
    padding: 20px 24px;
    background: rgba(0, 0, 0, 0.3);
    border-top: 1px solid rgba(139, 122, 184, 0.2);
    display: flex;
    justify-content: center;
}

.trial-continue-button {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 32px;
    background: linear-gradient(135deg, #8b7ab8 0%, #6a5a98 100%);
    border: none;
    border-radius: 10px;
    color: #ffffff;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(139, 122, 184, 0.4);
}

.trial-continue-button:hover {
    background: linear-gradient(135deg, #9d8acc 0%, #7b6aaa 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(139, 122, 184, 0.6);
}

.trial-continue-button:active {
    transform: translateY(0);
}

/* Don't dim RepoAudit title and contact buttons during selection mode - keep them fully functional */
body.selection-mode .tool-name-wrapper {
    opacity: 1;
    pointer-events: auto;
}

body.selection-mode .config-section .section-header-with-collapse,
body.selection-mode .config-section .upload-area {
    opacity: 0.3;
    pointer-events: none;
}

body.selection-mode .config-section {
    border-color: rgba(139, 122, 184, 0.3);
    box-shadow: 0 0 8px rgba(139, 122, 184, 0.05);
}

/* Dim user info area during selection mode */
body.selection-mode .user-info-section {
    opacity: 0.3;
    pointer-events: none;
}

/* Disable all buttons in sidebar except Select/Done during selection mode */
body.selection-mode .sidebar button:not(.select-mode-toggle) {
    pointer-events: none;
    cursor: not-allowed;
}

/* Ensure all content within uploaded files section is fully visible */
body.selection-mode .uploaded-files-section,
body.selection-mode .uploaded-files-section *,
body.selection-mode .uploaded-files-section .file-item,
body.selection-mode .uploaded-files-section .folder-header,
body.selection-mode .uploaded-files-section .file-label,
body.selection-mode .uploaded-files-section .uploaded-header,
body.selection-mode .uploaded-files-section .uploaded-content,
body.selection-mode .uploaded-files-section .file-list {
    opacity: 1 !important;
}

/* ========================================
   Issue Preview & Highlighting Styles
   ======================================== */

/* Issue header layout - split left and right */
.issue-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

.issue-header-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.issue-header-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Detail toggle button in issue header - clean & elegant */
.detail-toggle-button {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    background: rgba(251, 191, 36, 0.08);
    border: 1px solid rgba(251, 191, 36, 0.25);
    border-radius: 6px;
    color: #fbbf24;
    font-size: 12.5px;
    font-weight: 600;
    letter-spacing: 0.2px;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.detail-toggle-button:hover {
    background: rgba(251, 191, 36, 0.15);
    border-color: rgba(251, 191, 36, 0.4);
    color: #fcd34d;
    box-shadow: 0 2px 8px rgba(251, 191, 36, 0.15);
    transform: translateY(-0.5px);
}

.detail-toggle-button:active {
    transform: translateY(0);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.detail-toggle-button svg {
    width: 14px;
    height: 14px;
    opacity: 0.9;
    transition: transform 0.2s ease;
}

/* Preview button in issue header */
.preview-issue-button {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: rgba(251, 191, 36, 0.1);
    border: 1px solid rgba(251, 191, 36, 0.3);
    border-radius: 6px;
    color: #fbbf24;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.preview-issue-button:hover {
    background: rgba(251, 191, 36, 0.2);
    border-color: rgba(251, 191, 36, 0.5);
    transform: translateY(-1px);
}

.preview-issue-button svg {
    width: 14px;
    height: 14px;
}

/* Buggy value section styling */
.issue-buggy-value {
    margin: 16px 0;
    padding: 14px;
    background: rgba(251, 191, 36, 0.05);
    border-left: 3px solid #fbbf24;
    border-radius: 4px;
    font-size: 13px;
    line-height: 1.6;
    color: #d1d5db;
}

.issue-buggy-value .buggy-value-label {
    font-size: 13px;
    font-weight: 600;
    color: #fbbf24;
    letter-spacing: 0.5px;
    margin-right: 8px;
}

.issue-buggy-value .buggy-value-content {
    display: inline;
}

.issue-buggy-value .inline-code {
    display: inline;
    padding: 1px 4px;
    background: rgba(17, 24, 39, 0.6);
    border-radius: 2px;
    font-family: 'Monaco', 'Courier New', monospace;
    font-size: 12px;
    color: #fbbf24;
    line-height: 1.6;
    vertical-align: baseline;
}

.issue-buggy-value strong {
    color: #fbbf24;
    font-weight: 600;
}

.buggy-value-location {
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: underline;
    text-decoration-style: dotted;
    text-underline-offset: 2px;
}

.buggy-value-location:hover {
    color: #fcd34d;
    text-decoration-style: solid;
    filter: brightness(1.2);
}

/* Related files list - refined design */
.related-files {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 10px 0 16px 0;
    padding: 0;
}

.related-file-link {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 5px 10px;
    background: rgba(55, 65, 81, 0.4);
    border: 1px solid rgba(75, 85, 99, 0.3);
    border-radius: 5px;
    color: #9ca3af;
    font-size: 11.5px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: 'Monaco', 'Courier New', monospace;
}

.related-file-link:hover {
    background: rgba(59, 130, 246, 0.2);
    border-color: rgba(59, 130, 246, 0.4);
    color: #60a5fa;
    transform: translateY(-1px);
}

.related-file-link svg {
    flex-shrink: 0;
    opacity: 0.7;
}

/* Issue details container (collapsible) */
.issue-details {
    margin-top: 12px;
    animation: slideDown 0.2s ease;
}

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

/* Issue steps section */
.issue-steps {
    margin: 16px 0;
    padding: 14px;
    background: rgba(59, 130, 246, 0.05);
    border-left: 3px solid #3b82f6;
    border-radius: 4px;
}

.issue-steps h4 {
    margin: 0 0 12px 0;
    font-size: 14px;
    font-weight: 600;
    color: #3b82f6;
    letter-spacing: 0.5px;
    text-transform: none !important;
}

.issue-step {
    margin: 8px 0;
    padding: 8px 12px;
    background: rgba(17, 24, 39, 0.4);
    border-radius: 4px;
    font-size: 13px;
    line-height: 1.6;
    color: #d1d5db;
}

.issue-step:first-of-type {
    margin-top: 0;
}

.issue-step:last-of-type {
    margin-bottom: 0;
}

.issue-step .step-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 4px;
}

.issue-step .step-header strong {
    color: #60a5fa;
    font-weight: 600;
    margin: 0;
}

.issue-step .step-content {
    color: #d1d5db;
    line-height: 1.6;
}

.issue-step .step-location {
    display: inline-block;
    padding: 2px 6px;
    background: rgba(96, 165, 250, 0.1);
    border: 1px solid rgba(96, 165, 250, 0.3);
    border-radius: 3px;
    color: #60a5fa;
    font-size: 11.5px;
    font-family: 'Monaco', 'Courier New', monospace;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.issue-step .step-location:hover {
    background: rgba(96, 165, 250, 0.2);
    border-color: rgba(96, 165, 250, 0.5);
    color: #93c5fd;
}

/* Feedback section */
.feedback-section {
    margin: 20px 0 0 0;
    padding: 14px;
    background: rgba(139, 92, 246, 0.05);
    border-left: 3px solid #8b5cf6;
    border-radius: 4px;
}

.feedback-header {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.feedback-question {
    margin: 0;
    font-size: 14px;
    color: #a78bfa;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.feedback-buttons {
    display: flex;
    gap: 12px;
}

.feedback-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 16px;
    background: rgba(17, 24, 39, 0.4);
    border: 1px solid rgba(139, 92, 246, 0.3);
    border-radius: 6px;
    color: #a78bfa;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.feedback-btn:hover {
    background: rgba(139, 92, 246, 0.1);
    border-color: rgba(139, 92, 246, 0.5);
    color: #c4b5fd;
}

.feedback-btn.selected {
    background: rgba(139, 92, 246, 0.2);
    border-color: #8b5cf6;
    color: #e9d5ff;
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.1);
}

.feedback-btn svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

.feedback-status {
    margin-top: 8px;
    font-size: 12px;
    color: #10b981;
    font-weight: 500;
    opacity: 0;
    transition: opacity 0.3s ease;
    display: flex;
    align-items: center;
    gap: 4px;
}

.feedback-status.visible {
    opacity: 1;
}

.feedback-status.false-positive {
    color: #ef4444;
}

/* Highlighted line in code viewer */
.code-line.highlighted-line {
    position: relative;
    border-left: 3px solid #fbbf24;
    background: linear-gradient(
        to bottom,
        transparent 1px,
        rgba(251, 191, 36, 0.15) 1px,
        rgba(251, 191, 36, 0.15) calc(100% - 1px),
        transparent calc(100% - 1px)
    ) !important;
}

.code-line.highlighted-line .line-number {
    color: #fbbf24;
    font-weight: 600;
}

/* Flash animation for scrolling to line */
@keyframes flash-highlight {
    0%, 100% {
        background: rgba(251, 191, 36, 0.15);
    }
    50% {
        background: rgba(251, 191, 36, 0.35);
    }
}

.code-line.flash-highlight {
    animation: flash-highlight 1s ease-in-out;
}

/* Tooltip on hover for highlighted lines */
.line-tooltip {
    position: absolute;
    left: 0;
    top: 100%;
    min-width: 200px;
    max-width: 400px;
    width: max-content;
    padding: 8px 12px;
    background: rgba(17, 24, 39, 0.95);
    border: 1px solid rgba(251, 191, 36, 0.5);
    border-radius: 6px;
    font-size: 13px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'SF Pro Display', 'Roboto', 'Helvetica Neue', Arial, sans-serif;
    font-weight: 500;
    color: #ffffff;
    line-height: 1.5;
    white-space: normal;
    word-wrap: break-word;
    z-index: 1000;
    pointer-events: none;
    opacity: 0;
    transform: translateY(-5px);
    transition: all 0.2s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.code-line.highlighted-line:hover .line-tooltip {
    opacity: 1;
    transform: translateY(0);
}

/* Scrollbar indicators container */
.scrollbar-indicators {
    position: fixed;
    top: 0;
    right: 0;
    width: 16px;
    height: 100%;
    pointer-events: none;
    z-index: 1000;
}

/* Individual scrollbar indicator */
.scrollbar-indicator {
    position: absolute;
    right: 4px;
    width: 8px;
    height: 6px;
    background: #fbbf24;
    border-radius: 3px;
    cursor: pointer;
    pointer-events: all;
    transition: all 0.2s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.scrollbar-indicator:hover {
    width: 12px;
    right: 2px;
    background: #f59e0b;
    box-shadow: 0 0 10px rgba(251, 191, 36, 0.8), 0 2px 6px rgba(0, 0, 0, 0.4);
    transform: scale(1.1);
}

/* Issue-highlighted files in sidebar */
.file-item.issue-highlighted {
    border: 2px solid rgba(251, 191, 36, 0.4) !important;
    background: rgba(251, 191, 36, 0.08) !important;
}

.file-item.issue-highlighted .file-label {
    color: #fbbf24 !important;
    font-weight: 600;
}

/* Code viewer positioning for scrollbar indicators */
.code-viewer {
    position: relative;
}

/* Ensure code content doesn't overlap with scrollbar indicators */
.code-content {
    padding-right: 20px;
}


/* ============================================================================
   Custom Alert Dialog (Replaces browser alert)
   ============================================================================ */

.custom-alert-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10001;
    opacity: 0;
    transition: opacity 0.2s ease;
    padding: 20px;
}

.custom-alert-overlay.show {
    opacity: 1;
}

.custom-alert-dialog {
    background: linear-gradient(135deg, #2a2a2f 0%, #1e1e23 100%);
    border: 1px solid rgba(141, 122, 184, 0.3);
    border-radius: 12px;
    box-shadow:
        0 20px 60px rgba(0, 0, 0, 0.6),
        0 0 30px rgba(141, 122, 184, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    min-width: 320px;
    max-width: 500px;
    width: 100%;
    transform: scale(0.95);
    transition: transform 0.2s ease;
    overflow: hidden;
}

.custom-alert-overlay.show .custom-alert-dialog {
    transform: scale(1);
}

.custom-alert-header {
    padding: 20px 24px 16px;
    border-bottom: 1px solid rgba(141, 122, 184, 0.2);
}

.custom-alert-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: #8d7ab8;
    letter-spacing: -0.02em;
}

.custom-alert-body {
    padding: 24px;
}

.custom-alert-body p {
    margin: 0;
    font-size: 15px;
    line-height: 1.6;
    color: #d1d5db;
    white-space: pre-line;
}

.custom-alert-footer {
    padding: 16px 24px 20px;
    display: flex;
    justify-content: flex-end;
}

.custom-alert-button {
    background: linear-gradient(135deg, #8b7ab8 0%, #6a5a98 100%);
    color: white;
    border: none;
    border-radius: 6px;
    padding: 10px 32px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(139, 122, 184, 0.3);
    min-width: 100px;
}

.custom-alert-button:hover {
    background: linear-gradient(135deg, #9d8acc 0%, #7b6aa8 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(139, 122, 184, 0.4);
}

.custom-alert-button:active {
    transform: translateY(0);
    box-shadow: 0 2px 6px rgba(139, 122, 184, 0.3);
}

.custom-alert-button:focus {
    outline: none;
    box-shadow:
        0 2px 8px rgba(139, 122, 184, 0.3),
        0 0 0 3px rgba(139, 122, 184, 0.3);
}

/* Responsive */
@media (max-width: 600px) {
    .custom-alert-dialog {
        min-width: auto;
        max-width: 90vw;
    }

    .custom-alert-header {
        padding: 16px 20px 12px;
    }

    .custom-alert-header h3 {
        font-size: 16px;
    }

    .custom-alert-body {
        padding: 20px;
    }

    .custom-alert-body p {
        font-size: 14px;
    }

    .custom-alert-footer {
        padding: 12px 20px 16px;
    }

    .custom-alert-button {
        padding: 8px 24px;
        font-size: 13px;
    }
}
