/* CSS Variables for Theming */
:root {
    /* Light Theme Colors - FeatherPanel inspired */
    --bg-primary: #ffffff;
    --bg-secondary: #f8f9fa;
    --bg-tertiary: #e9ecef;
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --text-muted: #94a3b8;
    --border-color: #e5e7eb;
    --shadow: rgba(0, 0, 0, 0.05);
    
    /* HashiCorp Brand Colors */
    --hc-terraform: #7B42BC;
    --hc-terraform-hover: #5C2E91;
    --hc-vault: #FFD814;
    --hc-consul: #F24C53;
    --hc-nomad: #00CA8E;
    --hc-packer: #00ACFF;
    --hc-boundary: #6E41E6;
    --hc-waypoint: #1DAEFF;
    
    /* Primary (Terraform Purple) */
    --primary: var(--hc-terraform);
    --primary-hover: var(--hc-terraform-hover);
    --secondary: var(--hc-boundary);
    
    /* Status Colors (HashiCorp palette) */
    --success: var(--hc-nomad);
    --danger: var(--hc-consul);
    --warning: var(--hc-vault);
    --info: var(--hc-packer);
    --info-bg: #e0f2fe;
    --info-border: #0ea5e9;
    --status-queued: #64748b;
    --status-processing: var(--hc-packer);
    --status-completed: var(--hc-nomad);
    --status-failed: var(--hc-consul);
    
    /* UI Elements */
    --card-bg: #ffffff;
    --card-shadow: none;
    --input-bg: var(--bg-secondary);
    --input-border: #d1d5db;
    --input-focus: #7b42bc;
    
    /* Transitions */
    --transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Dark Theme - FeatherPanel inspired */
[data-theme="dark"] {
    --bg-primary: #18181b;
    --bg-secondary: #27272a;
    --bg-tertiary: #3f3f46;
    --text-primary: #fafafa;
    --text-secondary: #a1a1aa;
    --text-muted: #71717a;
    --border-color: #3f3f46;
    --shadow: rgba(0, 0, 0, 0.5);
    
    --card-bg: #27272a;
    --card-shadow: none;
    --input-bg: #18181b;
    --input-border: #3f3f46;
    --input-focus: #a78bfa;
    
    /* Adjust HashiCorp colors for dark mode visibility */
    --hc-terraform: #a78bfa;
    --hc-terraform-hover: #8b5cf6;
    --hc-vault: #fbbf24;
    --hc-consul: #fb7185;
    --hc-nomad: #34d399;
    --hc-packer: #60a5fa;
}

/* Reset & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    transition: var(--transition);
    font-weight: 400;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Container */
.container {
    max-width: 1920px;
    margin: 0 auto;
    padding: 0 1rem;
}

/* Header */
.app-header {
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: none;
}

.header-content {
    display: grid;
    grid-template-columns: 300px 1fr auto auto;
    gap: 1.5rem;
    align-items: center;
    max-width: 1920px;
    margin: 0 auto;
}

.header-left {
    display: flex;
    align-items: center;
    justify-content: flex-start;
}

.header-center {
    display: flex;
    align-items: center;
    justify-content: center;
}

.header-right {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.75rem;
}

/* User and Admin Badges */
.user-badge,
.admin-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.875rem;
    border-radius: 6px;
    font-size: 0.875rem;
    font-weight: 500;
    transition: var(--transition);
    white-space: nowrap;
}

.user-badge {
    background: var(--bg-tertiary);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    cursor: pointer;
}

.user-badge:hover {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

.user-badge i {
    width: 16px;
    height: 16px;
}

.admin-badge {
    background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
    color: #78350f;
    border: 1px solid #f59e0b;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(251, 191, 36, 0.25);
}

.admin-badge i {
    width: 16px;
    height: 16px;
    stroke-width: 2.5;
}

[data-theme="dark"] .admin-badge {
    background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
    color: #78350f;
    border-color: #fbbf24;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.header-action-btn {
    width: 36px;
    height: 36px;
    padding: 0;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    color: var(--text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.header-action-btn i {
    width: 16px;
    height: 16px;
}

.header-action-btn:hover {
    background: var(--bg-tertiary);
    border-color: var(--primary);
    color: var(--text-primary);
}

.header-action-btn-primary {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
}

.header-action-btn-primary:hover {
    background: var(--primary-hover);
    border-color: var(--primary-hover);
}

.app-header h1 {
    font-size: 1.75rem;
    color: var(--primary);
    font-weight: 600;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    letter-spacing: -0.025em;
}

.header-icon {
    width: 28px;
    height: 28px;
    stroke-width: 2.5;
}

.header-logo {
    width: 32px;
    height: 32px;
    object-fit: contain;
}

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

.provider-indicator {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.375rem 0.75rem;
    background: var(--bg-tertiary);
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 500;
    border: 1px solid var(--border-color);
    transition: var(--transition);
    letter-spacing: -0.01em;
}

.provider-icon {
    width: 14px;
    height: 14px;
}

.provider-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    animation: pulse-dot 2s ease-in-out infinite;
}

.provider-dot.gemini {
    background: #4285f4;
}

.provider-dot.aws {
    background: #FF9900;
}

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

[data-theme="dark"] .header-right .icon-btn {
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
}

[data-theme="dark"] .header-right .icon-btn:hover {
    background: var(--bg-primary);
    border-color: var(--text-muted);
}

/* Theme Toggle Switch */
.theme-toggle-container {
    display: flex;
    align-items: center;
}

.theme-toggle-switch {
    position: relative;
    display: inline-block;
    width: 56px;
    height: 28px;
    cursor: pointer;
}

.theme-toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.theme-toggle-slider {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 28px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 6px;
}

.theme-toggle-slider::before {
    content: "";
    position: absolute;
    height: 20px;
    width: 20px;
    left: 4px;
    background: white;
    border-radius: 50%;
    transition: transform 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    z-index: 2;
}

.theme-toggle-switch input:checked + .theme-toggle-slider::before {
    transform: translateX(28px);
}

.theme-toggle-switch input:checked + .theme-toggle-slider {
    background: var(--primary);
}

.theme-icon-sun,
.theme-icon-moon {
    width: 14px;
    height: 14px;
    z-index: 1;
}

.theme-icon-sun {
    color: #fbbf24;
}

.theme-icon-moon {
    color: #cbd5e1;
}

[data-theme="dark"] .theme-toggle-slider::before {
    background: var(--bg-primary);
}

/* Main Content */
.app-main {
    padding: 1rem 0;
    min-height: calc(100vh - 200px);
}

/* 3-Column Layout */
.layout-container {
    display: grid;
    grid-template-columns: 300px 1fr;
    grid-template-rows: minmax(0, 1fr);
    grid-template-areas: "left middle";
    gap: 1.5rem;
    max-width: 1920px;
    margin: 0 auto;
    padding: 0 1rem;
    height: calc(100vh - 120px);
    max-height: calc(100vh - 120px);
    overflow: hidden;
    align-items: stretch;
    transition: grid-template-columns 0.3s ease;
}

.layout-container.sidebar-collapsed {
    grid-template-columns: 60px 1fr;
}

.left-sidebar {
    grid-area: left;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    overflow-y: auto;
    height: 100%;
    min-height: 0;
    padding: 1rem;
    position: relative;
    transition: width 0.3s ease;
    width: 300px;
    scrollbar-gutter: stable;
}

.left-sidebar > .card {
    flex-shrink: 0;
    margin-bottom: 0 !important;
}

.left-sidebar-toggle {
    position: absolute;
    top: 0.625rem;
    right: 0.625rem;
    width: 32px;
    height: 32px;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    color: var(--text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    flex-shrink: 0;
    z-index: 10;
}

.left-sidebar-toggle:hover {
    background: var(--bg-tertiary);
    color: var(--text-primary);
    border-color: var(--primary);
    transform: scale(1.05);
}

.left-sidebar-toggle i {
    width: 16px;
    height: 16px;
    transition: transform 0.3s ease;
}

/* Custom Scrollbar */
.left-sidebar::-webkit-scrollbar,
.reports-list::-webkit-scrollbar,
.dashboard-content::-webkit-scrollbar,
.content-scroll-area::-webkit-scrollbar,
.reports-table-container::-webkit-scrollbar {
    width: 8px;
}

.left-sidebar::-webkit-scrollbar-track,
.reports-list::-webkit-scrollbar-track,
.dashboard-content::-webkit-scrollbar-track,
.content-scroll-area::-webkit-scrollbar-track,
.reports-table-container::-webkit-scrollbar-track {
    background: var(--bg-secondary);
    border-radius: 4px;
}

.left-sidebar::-webkit-scrollbar-thumb,
.reports-list::-webkit-scrollbar-thumb,
.dashboard-content::-webkit-scrollbar-thumb,
.content-scroll-area::-webkit-scrollbar-thumb,
.reports-table-container::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 4px;
}

.left-sidebar::-webkit-scrollbar-thumb:hover,
.reports-list::-webkit-scrollbar-thumb:hover,
.dashboard-content::-webkit-scrollbar-thumb:hover,
.content-scroll-area::-webkit-scrollbar-thumb:hover,
.reports-table-container::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}

/* Firefox scrollbar */
.left-sidebar,
.reports-list,
.dashboard-content,
.content-scroll-area,
.reports-table-container {
    scrollbar-width: thin;
    scrollbar-color: var(--border-color) var(--bg-secondary);
}

.left-sidebar.collapsed {
    width: 60px;
    padding: 0.75rem 0.5rem;
    align-items: center;
    gap: 0.5rem;
}

.left-sidebar.collapsed .mode-btn-text,
.left-sidebar.collapsed .card h2 span:not(.icon-only),
.left-sidebar.collapsed .card h2,
.left-sidebar.collapsed .form-group,
.left-sidebar.collapsed .button-group,
.left-sidebar.collapsed .input-section-content,
.left-sidebar.collapsed label:not(.icon-only),
.left-sidebar.collapsed small,
.left-sidebar.collapsed .reports-section,
.left-sidebar.collapsed .reports-section .report-item,
.left-sidebar.collapsed .reports-section h3,
.left-sidebar.collapsed .reports-section .section-header,
.left-sidebar.collapsed .reports-list,
.left-sidebar.collapsed .analysis-results-section,
.left-sidebar.collapsed .analysis-results-section h2,
.left-sidebar.collapsed .tabs-vertical,
.left-sidebar.collapsed .input-section-header,
.left-sidebar.collapsed .card {
    display: none !important;
}

.left-sidebar.collapsed .mode-selector {
    flex-direction: column;
    gap: 0.5rem;
    padding: 0;
    padding-top: 3rem;
    align-items: center;
    width: 100%;
    margin-top: 0;
    background: transparent;
    border: none;
}

.left-sidebar.collapsed .mode-btn {
    flex: none;
    width: 44px;
    height: 44px;
    padding: 0;
    justify-content: center;
    border-radius: 8px;
    min-width: 44px;
}

.left-sidebar.collapsed .mode-btn i {
    margin: 0;
    width: 20px;
    height: 20px;
}

.left-sidebar.collapsed .left-sidebar-toggle {
    position: absolute;
    top: 0.5rem;
    left: 50%;
    transform: translateX(-50%);
    width: 36px;
    height: 36px;
}

.left-sidebar.collapsed .left-sidebar-toggle i {
    transform: rotate(180deg);
    width: 18px;
    height: 18px;
}


.left-sidebar > .card {
    flex-shrink: 0;
}

.mode-selector {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.5rem;
    padding: 0.5rem;
    padding-top: 2.75rem;
    background: var(--bg-secondary);
    border-radius: 8px;
    border: 1px solid var(--border-color);
    margin-top: 0;
    position: relative;
}

.mode-selector .mode-btn:last-child {
    grid-column: 1 / -1;
}

.mode-btn {
    min-width: 0;
    padding: 0.625rem 0.875rem;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    color: var(--text-secondary);
    font-size: 0.8125rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    white-space: nowrap;
}

.mode-btn i {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

.mode-btn:hover {
    background: var(--bg-tertiary);
    border-color: var(--primary);
    color: var(--text-primary);
}

.mode-btn.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
    box-shadow: 0 2px 6px rgba(123, 66, 188, 0.3);
}

.mode-btn.active:hover {
    background: var(--primary-hover);
    box-shadow: 0 2px 8px rgba(123, 66, 188, 0.4);
}

.left-sidebar > .analysis-results-section {
    flex-shrink: 0;
    min-height: 0;
}

.middle-content {
    grid-area: middle;
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 0;
    overflow: hidden;
}

/* Article header container - constrained height */
#article-header-container {
    flex-shrink: 0;
    max-height: none;
    overflow: visible;
    min-height: 0;
}

/* Content scroll area - scrolls independently with more space */
.content-scroll-area {
    flex: 1;
    overflow-y: auto;
    min-height: 0;
    padding-right: 0.5rem;
    height: 100%;
    scrollbar-gutter: stable;
}

/* Article header placeholder */
.article-header-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    background: var(--bg-secondary);
    border-radius: 8px;
    border: 2px dashed var(--border-color);
    margin-bottom: 1.5rem;
    text-align: center;
}

.article-header-placeholder img {
    width: 64px;
    height: 64px;
    margin-bottom: 1rem;
    opacity: 0.6;
}

.article-header-placeholder p {
    color: var(--text-secondary);
    font-size: 0.9375rem;
    margin: 0;
}

/* Vertical tabs in left sidebar */
.analysis-results-section {
    background: var(--bg-secondary);
    border-radius: 12px;
    padding: 1rem;
    border: 1px solid var(--border-color);
}

.analysis-results-section h2 {
    font-size: 1rem;
    margin-bottom: 0.75rem;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.tabs-vertical {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.tab-btn-vertical {
    width: 100%;
    padding: 0.625rem 0.875rem;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    color: var(--text-secondary);
    font-size: 0.875rem;
    font-weight: 500;
    text-align: left;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.tab-btn-vertical i {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

.tab-btn-vertical:hover {
    background: var(--bg-tertiary);
    border-color: var(--primary);
}

.tab-btn-vertical.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

/* Copy buttons section */
.copy-buttons-section {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.copy-buttons-section .btn {
    width: 100%;
    font-size: 0.8125rem;
    padding: 0.625rem 1rem;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 0.5rem;
}

.copy-buttons-section .btn i {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

/* Hamburger buttons (hidden on desktop) */
.hamburger-btn {
    display: none;
    position: fixed;
    top: 80px;
    z-index: 1001;
    width: 44px;
    height: 44px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-primary);
    cursor: pointer;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.left-hamburger {
    left: 1rem;
}

.right-hamburger {
    right: 1rem;
}

/* Processing status compact (integrated into input card) - Enhanced */
.processing-status-compact {
    padding: 1.25rem;
    background: linear-gradient(135deg, rgba(123, 66, 188, 0.08) 0%, rgba(167, 139, 250, 0.12) 100%);
    border: 1px solid rgba(123, 66, 188, 0.15);
    border-radius: 10px;
    margin-bottom: 1rem;
    backdrop-filter: blur(10px);
    animation: slideInFromTop 0.3s ease-out;
}

[data-theme="dark"] .processing-status-compact {
    background: linear-gradient(135deg, rgba(167, 139, 250, 0.08) 0%, rgba(123, 66, 188, 0.12) 100%);
    border-color: rgba(167, 139, 250, 0.2);
}

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

.processing-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.processing-title .pulse-icon {
    width: 20px;
    height: 20px;
    color: var(--primary);
    animation: pulse 2s ease-in-out infinite;
}

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

.status-label {
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--text-primary);
    letter-spacing: 0.01em;
}

.processing-stats {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    color: var(--text-muted);
    font-weight: 500;
}

#progress-percentage {
    color: var(--primary);
    font-weight: 700;
    font-size: 0.9rem;
}

.stat-separator {
    color: var(--border-color);
}

#progress-timer {
    font-variant-numeric: tabular-nums;
    color: var(--text-muted);
}

.progress-info {
    margin-bottom: 0.75rem;
}

.progress-meta {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.progress-count {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-secondary);
}

.progress-detail {
    font-size: 0.8rem;
    color: var(--text-muted);
    line-height: 1.4;
}

.processing-progress {
    height: 6px;
    background: var(--bg-tertiary);
    border-radius: 10px;
    overflow: hidden;
    position: relative;
    margin-bottom: 0.75rem;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--primary) 0%, var(--secondary) 100%);
    transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    width: 0%;
    position: relative;
    border-radius: 10px;
    box-shadow: 0 0 8px rgba(123, 66, 188, 0.3);
}

.progress-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 2s infinite;
}

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

.provider-status-mini {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    padding-top: 0.5rem;
    border-top: 1px solid var(--border-color);
}

.provider-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.35rem 0.65rem;
    background: var(--bg-tertiary);
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 500;
    transition: all 0.2s ease;
}

.provider-badge i {
    width: 12px;
    height: 12px;
}

.provider-badge.pending {
    color: var(--text-muted);
}

.provider-badge.processing {
    color: var(--primary);
    background: rgba(123, 66, 188, 0.1);
    animation: pulse 1.5s ease-in-out infinite;
}

.provider-badge.processing i {
    animation: spin 1s linear infinite;
}

.provider-badge.completed {
    color: var(--success);
    background: rgba(34, 197, 94, 0.1);
}

.provider-badge.failed {
    color: var(--danger);
    background: rgba(239, 68, 68, 0.1);
}

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

@media (max-width: 1200px) {
    .layout-container:not(.sidebar-manual-expanded) {
        grid-template-columns: 60px 1fr;
    }
    
    .left-sidebar:not(.manual-expanded) {
        width: 60px;
        padding: 0.5rem;
        align-items: center;
        gap: 0.5rem;
    }
    
    .left-sidebar:not(.manual-expanded) .mode-selector {
        flex-direction: column;
        gap: 0.5rem;
        padding: 0;
        padding-top: 3rem;
        align-items: center;
        width: 100%;
        margin-top: 0;
        background: transparent;
        border: none;
    }
    
    .left-sidebar:not(.manual-expanded) .mode-btn-text,
    .left-sidebar:not(.manual-expanded) .card h2 span:not(.icon-only),
    .left-sidebar:not(.manual-expanded) .card h2,
    .left-sidebar:not(.manual-expanded) .form-group,
    .left-sidebar:not(.manual-expanded) .button-group,
    .left-sidebar:not(.manual-expanded) .input-section-content,
    .left-sidebar:not(.manual-expanded) label:not(.icon-only),
    .left-sidebar:not(.manual-expanded) small,
    .left-sidebar:not(.manual-expanded) .reports-section,
    .left-sidebar:not(.manual-expanded) .reports-section .report-item,
    .left-sidebar:not(.manual-expanded) .reports-section h3,
    .left-sidebar:not(.manual-expanded) .reports-section .section-header,
    .left-sidebar:not(.manual-expanded) .reports-list,
    .left-sidebar:not(.manual-expanded) .analysis-results-section,
    .left-sidebar:not(.manual-expanded) .analysis-results-section h2,
    .left-sidebar:not(.manual-expanded) .tabs-vertical,
    .left-sidebar:not(.manual-expanded) .input-section-header,
    .left-sidebar:not(.manual-expanded) .card {
        display: none !important;
    }
    
    .left-sidebar:not(.manual-expanded) .mode-btn {
        flex: none;
        width: 44px;
        height: 44px;
        padding: 0;
        justify-content: center;
        border-radius: 8px;
        min-width: 44px;
    }
    
    .left-sidebar:not(.manual-expanded) .mode-btn i {
        margin: 0;
        width: 20px;
        height: 20px;
    }
    
    .left-sidebar:not(.manual-expanded) .left-sidebar-toggle {
        position: absolute;
        top: 0.5rem;
        left: 50%;
        transform: translateX(-50%);
        width: 36px;
        height: 36px;
    }
    
    .left-sidebar:not(.manual-expanded) .left-sidebar-toggle i {
        transform: rotate(180deg);
        width: 18px;
        height: 18px;
    }
    
    .header-content {
        grid-template-columns: 200px 1fr auto auto;
        gap: 1rem;
    }
    
    .header-actions {
        gap: 0.25rem;
    }
    
    .header-action-btn {
        width: 28px;
        height: 28px;
    }
}

/* Mobile responsive (<768px) */
@media (max-width: 768px) {
    .layout-container {
        grid-template-columns: 1fr !important;
        grid-template-areas: "middle" !important;
        padding: 0.5rem;
        gap: 0;
    }
    
    .hamburger-btn {
        display: flex;
    }
    
    .left-sidebar,
    .left-sidebar.collapsed,
    .left-sidebar:not(.manual-expanded),
    .left-sidebar.manual-expanded {
        position: fixed !important;
        top: 0;
        bottom: 0;
        left: 0;
        width: 85% !important;
        max-width: 320px !important;
        background: var(--bg-primary);
        z-index: 1000;
        transform: translateX(-100%);
        transition: transform 0.3s ease;
        overflow-y: auto;
        padding: 1rem !important;
        box-shadow: 2px 0 12px rgba(0, 0, 0, 0.2);
        align-items: stretch !important;
        gap: 0.75rem !important;
    }
    
    .left-sidebar.open {
        transform: translateX(0);
    }
    
    /* Reset all collapsed state styles on mobile */
    .left-sidebar .mode-selector,
    .left-sidebar.collapsed .mode-selector,
    .left-sidebar:not(.manual-expanded) .mode-selector {
        flex-direction: row !important;
        flex-wrap: wrap !important;
        padding: 0.5rem !important;
        padding-top: 0.5rem !important;
        background: var(--bg-secondary) !important;
        border: 1px solid var(--border-color) !important;
        margin-top: 0.5rem !important;
        width: 100% !important;
    }
    
    .left-sidebar .mode-btn,
    .left-sidebar.collapsed .mode-btn,
    .left-sidebar:not(.manual-expanded) .mode-btn {
        flex: 1 !important;
        width: auto !important;
        height: auto !important;
        min-width: auto !important;
        padding: 0.5rem 0.75rem !important;
        border-radius: 6px !important;
    }
    
    .left-sidebar .mode-btn i,
    .left-sidebar.collapsed .mode-btn i,
    .left-sidebar:not(.manual-expanded) .mode-btn i {
        width: 16px !important;
        height: 16px !important;
    }
    
    .left-sidebar .mode-btn-text,
    .left-sidebar.collapsed .mode-btn-text,
    .left-sidebar:not(.manual-expanded) .mode-btn-text {
        display: inline !important;
    }
    
    .left-sidebar .card,
    .left-sidebar.collapsed .card,
    .left-sidebar:not(.manual-expanded) .card,
    .left-sidebar .form-group,
    .left-sidebar.collapsed .form-group,
    .left-sidebar:not(.manual-expanded) .form-group,
    .left-sidebar .button-group,
    .left-sidebar.collapsed .button-group,
    .left-sidebar:not(.manual-expanded) .button-group,
    .left-sidebar .input-section-content,
    .left-sidebar.collapsed .input-section-content,
    .left-sidebar:not(.manual-expanded) .input-section-content,
    .left-sidebar .input-section-header,
    .left-sidebar.collapsed .input-section-header,
    .left-sidebar:not(.manual-expanded) .input-section-header,
    .left-sidebar label,
    .left-sidebar.collapsed label,
    .left-sidebar:not(.manual-expanded) label,
    .left-sidebar small,
    .left-sidebar.collapsed small,
    .left-sidebar:not(.manual-expanded) small {
        display: block !important;
    }
    
    .left-sidebar .reports-section,
    .left-sidebar.collapsed .reports-section,
    .left-sidebar:not(.manual-expanded) .reports-section,
    .left-sidebar .reports-section .section-header,
    .left-sidebar.collapsed .reports-section .section-header,
    .left-sidebar:not(.manual-expanded) .reports-section .section-header,
    .left-sidebar .reports-section h2,
    .left-sidebar.collapsed .reports-section h2,
    .left-sidebar:not(.manual-expanded) .reports-section h2,
    .left-sidebar .reports-section h3,
    .left-sidebar.collapsed .reports-section h3,
    .left-sidebar:not(.manual-expanded) .reports-section h3,
    .left-sidebar .reports-section .report-item,
    .left-sidebar.collapsed .reports-section .report-item,
    .left-sidebar:not(.manual-expanded) .reports-section .report-item,
    .left-sidebar .reports-list,
    .left-sidebar.collapsed .reports-list,
    .left-sidebar:not(.manual-expanded) .reports-list {
        display: block !important;
    }
    
    .left-sidebar .analysis-results-section,
    .left-sidebar.collapsed .analysis-results-section,
    .left-sidebar:not(.manual-expanded) .analysis-results-section,
    .left-sidebar .analysis-results-section h2,
    .left-sidebar.collapsed .analysis-results-section h2,
    .left-sidebar:not(.manual-expanded) .analysis-results-section h2,
    .left-sidebar .tabs-vertical,
    .left-sidebar.collapsed .tabs-vertical,
    .left-sidebar:not(.manual-expanded) .tabs-vertical {
        display: block !important;
    }
    
    .left-sidebar .card h2,
    .left-sidebar.collapsed .card h2,
    .left-sidebar:not(.manual-expanded) .card h2,
    .left-sidebar .card h2 span,
    .left-sidebar.collapsed .card h2 span,
    .left-sidebar:not(.manual-expanded) .card h2 span {
        display: flex !important;
    }
    
    .left-sidebar .left-sidebar-toggle {
        display: none !important;
    }
    
    .reports-dashboard {
        padding: 0.5rem;
    }
    
    .dashboard-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .dashboard-actions {
        width: 100%;
        flex-wrap: wrap;
    }
    
    .user-tabs {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .reports-table-container {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .reports-table {
        min-width: 600px;
    }
    
    .header-content {
        grid-template-columns: 1fr auto;
        gap: 0.5rem;
    }
    
    .header-center {
        display: none;
    }
    
    .header-actions {
        gap: 0.25rem;
    }
    
    .header-action-btn {
        width: 32px;
        height: 32px;
    }
    
    .bulk-actions {
        flex-wrap: wrap;
        gap: 0.5rem;
    }
    
    .bulk-actions button {
        font-size: 0.75rem;
        padding: 0.375rem 0.75rem;
    }
    
    /* Overlay backdrop */
    .sidebar-overlay {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0, 0, 0, 0.5);
        z-index: 999;
    }
    
    .sidebar-overlay.active {
        display: block;
    }
}

/* Cards */
.card {
    background: var(--bg-secondary);
    border-radius: 12px;
    padding: 1rem;
    margin-bottom: 1rem;
    box-shadow: none;
    border: 1px solid var(--border-color);
    transition: var(--transition);
}

.card:hover {
    border-color: var(--text-muted);
}

[data-theme="dark"] .card {
    background: var(--bg-secondary);
    border-color: var(--border-color);
}

[data-theme="dark"] .card:hover {
    border-color: var(--text-muted);
}

.input-section-collapsible.collapsed:hover {
    transform: none;
    box-shadow: var(--card-shadow);
}

.card h2 {
    font-size: 1.125rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 0.625rem;
    font-weight: 600;
    letter-spacing: -0.02em;
}

.card h2 svg,
.card h2 i {
    width: 20px;
    height: 20px;
    opacity: 0.7;
}

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

.section-header h2 {
    margin-bottom: 0;
}

/* Collapsible Input Section */
.input-section-collapsible {
    overflow: hidden;
    transition: all 0.3s ease;
}

.input-section-collapsible.collapsed {
    padding: 0.75rem 1rem;
    min-height: auto;
}

.input-section-collapsible.collapsed .input-section-content {
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    margin-top: 0;
    margin-bottom: 0;
}

.input-section-collapsible.collapsed .input-section-header {
    margin-bottom: 0;
}

.input-section-collapsible.collapsed .input-section-header h2 {
    margin-bottom: 0;
}

.input-section-collapsible:not(.collapsed) .input-section-content {
    max-height: 1000px;
    opacity: 1;
    margin-top: 0.75rem;
    transition: max-height 0.4s ease, opacity 0.4s ease, margin-top 0.3s ease;
}

.input-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    user-select: none;
    padding: 0.25rem 0;
}

.input-section-header h2 {
    margin: 0;
    transition: all 0.3s ease;
    font-size: 1.0625rem;
}

.collapse-toggle {
    background: var(--bg-tertiary);
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
    color: var(--text-secondary);
}

.collapse-toggle:hover {
    background: var(--border-color);
    color: var(--text-primary);
}

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

.input-section-content {
    transition: max-height 0.4s ease, opacity 0.4s ease;
}

/* Buttons */
/* ========================================
   BUTTON HIERARCHY SYSTEM
   ======================================== */

/* Base Button Styles */
.btn {
    padding: 0.625rem 1.25rem;
    border-radius: 6px;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    position: relative;
    overflow: hidden;
    letter-spacing: -0.01em;
    white-space: nowrap;
}

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

.btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn:hover::before {
    width: 300px;
    height: 300px;
}

/* Primary Actions - Solid Color (Main CTAs) */
.btn-primary {
    background: var(--primary);
    color: white;
    border: none;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.btn-primary:hover {
    background: var(--primary-hover);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transform: translateY(-1px);
}

[data-theme="dark"] .btn-primary {
    background: var(--hc-terraform);
}

[data-theme="dark"] .btn-primary:hover {
    background: var(--hc-terraform-hover);
}

/* Secondary Actions - Outlined (Supporting Actions) */
.btn-secondary {
    background: transparent;
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background: var(--bg-tertiary);
    border-color: var(--text-secondary);
    transform: translateY(-1px);
}

/* Danger Actions - Red (Destructive Actions) */
.btn-danger {
    background: var(--danger);
    color: white;
    border: none;
}

.btn-danger:hover {
    background: #dc2626;
    transform: translateY(-1px);
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
}

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

.icon-btn {
    background: transparent;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 8px;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
}

.icon-btn svg,
.icon-btn i {
    width: 20px;
    height: 20px;
}

.icon-btn:hover {
    background: var(--bg-tertiary);
    color: var(--text-primary);
}

[data-theme="dark"] .icon-btn {
    color: var(--text-secondary);
}

[data-theme="dark"] .icon-btn:hover {
    background: var(--bg-tertiary);
    color: var(--text-primary);
}

.button-group {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

/* Forms */
.input-field {
    width: 100%;
    padding: 0.625rem 0.875rem;
    border: 1px solid var(--input-border);
    border-radius: 6px;
    background: var(--input-bg);
    color: var(--text-primary);
    font-size: 0.875rem;
    transition: var(--transition);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.input-field:focus {
    outline: none;
    border-color: var(--input-focus);
    box-shadow: 0 0 0 3px rgba(123, 66, 188, 0.1);
}

[data-theme="dark"] .input-field:focus {
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.2);
}

.textarea {
    resize: vertical;
    font-family: inherit;
}

.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.8125rem;
}

.form-row {
    margin: 1rem 0;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
}

.checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

/* API Key Section */
.api-key-status {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: var(--bg-secondary);
    border-radius: 8px;
}

.api-key-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.success-message {
    padding: 1rem;
    background: rgba(40, 167, 69, 0.1);
    border: 1px solid var(--success);
    border-radius: 8px;
    color: var(--success);
    font-weight: 600;
    margin-bottom: 1rem;
}

/* Tabs */
.tabs {
    display: flex;
    gap: 0.25rem;
    margin-bottom: 1.5rem;
    border-bottom: 1px solid var(--border-color);
    background: var(--bg-primary);
    padding: 0.25rem;
    border-radius: 8px 8px 0 0;
}

.tab-btn {
    padding: 0.5rem 1rem;
    background: transparent;
    border: none;
    border-radius: 6px;
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 0.8125rem;
    cursor: pointer;
    transition: var(--transition);
    letter-spacing: -0.01em;
}

.tab-btn:hover {
    color: var(--text-primary);
    background: var(--bg-secondary);
}

.tab-btn.active {
    color: var(--text-primary);
    background: var(--bg-secondary);
    font-weight: 600;
}

[data-theme="dark"] .tab-btn.active {
    background: var(--bg-tertiary);
}

/* Provider Badges & Indicators */
.provider-config {
    padding: 1.25rem;
    background: var(--bg-primary);
    border-radius: 8px;
    border: 1px solid var(--border-color);
    height: 100%;
    display: flex;
    flex-direction: column;
}

.provider-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.provider-enable {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.1rem;
    cursor: pointer;
}

.provider-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.provider-badge {
    font-size: 0.75rem;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-weight: 500;
}

.provider-badge.gemini {
    background: linear-gradient(135deg, #4285f4, #34a853);
    color: white;
}

.provider-badge.aws {
    background: linear-gradient(135deg, #FF9900, #232F3E);
    color: white;
}

.provider-details {
    margin-top: 1rem;
    padding-left: 1.5rem;
}

.provider-note {
    margin-top: 1.5rem;
    padding: 1rem;
    background: rgba(123, 66, 188, 0.08);
    border-left: 3px solid var(--primary);
    border-radius: 6px;
    font-size: 0.875rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

.provider-note strong {
    color: var(--text-primary);
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}

[data-theme="dark"] .provider-note {
    background: rgba(167, 139, 250, 0.1);
}

/* Provider Tab Badges */
.tab-provider-badge {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-right: 0.5rem;
}

.tab-provider-badge.gemini-bg {
    background: #4285f4;
}

.tab-provider-badge.aws-bg {
    background: #FF9900;
}

/* Provider Badge Headers in Results */
.provider-badge-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    margin-bottom: 1.5rem;
    border-radius: 8px;
    font-weight: 600;
    font-size: 1rem;
}

.provider-badge-header svg,
.provider-badge-header i {
    width: 20px;
    height: 20px;
}

.provider-badge-header.gemini {
    background: linear-gradient(135deg, rgba(66, 133, 244, 0.1), rgba(52, 168, 83, 0.1));
    border-left: 4px solid #4285f4;
}

.provider-badge-header.aws {
    background: linear-gradient(135deg, rgba(255, 153, 0, 0.1), rgba(35, 47, 62, 0.1));
    border-left: 4px solid #FF9900;
}

[data-theme="dark"] .provider-badge-header.gemini {
    background: rgba(66, 133, 244, 0.15);
}

[data-theme="dark"] .provider-badge-header.aws {
    background: rgba(255, 153, 0, 0.15);
}

.provider-badge-header .badge-icon {
    flex-shrink: 0;
}

/* Status Indicator for AWS Credentials */
.status-indicator {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem;
    background: var(--bg-tertiary);
    border-radius: 6px;
    margin: 0.5rem 0;
}

.status-indicator .status-icon {
    font-size: 1.25rem;
}

.status-indicator .status-text {
    font-weight: 500;
}

.status-indicator.success {
    background: rgba(0, 202, 142, 0.1);
    border-left: 3px solid var(--hc-nomad);
}

.status-indicator.error {
    background: rgba(242, 76, 83, 0.1);
    border-left: 3px solid var(--hc-consul);
}

.status-indicator.warning {
    background: rgba(255, 216, 20, 0.1);
    border-left: 3px solid var(--hc-vault);
    color: var(--text-primary);
}

[data-theme="dark"] .status-indicator.warning {
    background: rgba(255, 230, 109, 0.1);
}

/* Provider Copy Buttons */
.provider-copy-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.aws-status-section {
    margin-bottom: 1rem;
}

/* Hide disabled provider tabs */
.tab-btn[style*="display: none"] {
    display: none !important;
}

.tab-panel[style*="display: none"] {
    display: none !important;
}

.tab-panel {
    display: none;
}

.tab-panel.active {
    display: block;
}

/* Drop Zone */
.drop-zone {
    border: 3px dashed var(--border-color);
    border-radius: 12px;
    padding: 3rem;
    text-align: center;
    transition: var(--transition);
    cursor: pointer;
}

.drop-zone:hover,
.drop-zone.drag-over {
    border-color: var(--primary);
    background: var(--bg-secondary);
}

.drop-zone-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.upload-icon {
    color: var(--text-muted);
}

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

/* CSV Preview */
#csv-preview-content {
    padding: 1rem;
    background: var(--bg-secondary);
    border-radius: 8px;
    margin: 1rem 0;
    max-height: 300px;
    overflow-y: auto;
}

/* Progress Section */
.progress-header {
    margin-bottom: 2rem;
}

.progress-stats {
    display: flex;
    justify-content: space-between;
    margin-bottom: 1rem;
    font-weight: 600;
}

.progress-bar-container {
    width: 100%;
    height: 8px;
    background: var(--bg-tertiary);
    border-radius: 4px;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    width: 0%;
    transition: width 0.3s ease;
}

.articles-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.article-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: var(--bg-secondary);
    border-radius: 8px;
    border-left: 4px solid var(--border-color);
}

.article-item.queued {
    border-left-color: var(--status-queued);
}

.article-item.processing {
    border-left-color: var(--status-processing);
    animation: pulse 1.5s ease-in-out infinite;
}

.article-item.completed {
    border-left-color: var(--status-completed);
}

.article-item.failed {
    border-left-color: var(--status-failed);
}

.article-status-icon {
    font-size: 1.5rem;
    flex-shrink: 0;
}

.article-info {
    flex: 1;
}

.article-title {
    font-weight: 600;
    margin-bottom: 0.25rem;
}

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

.article-error {
    color: var(--danger);
    font-size: 0.875rem;
    margin-top: 0.5rem;
    padding: 0.5rem;
    background: rgba(220, 53, 69, 0.1);
    border-radius: 4px;
}

.article-error strong {
    display: block;
    margin-bottom: 0.25rem;
}

.article-error small {
    display: block;
    margin-top: 0.5rem;
    opacity: 0.9;
}

.article-error a {
    color: var(--danger);
    text-decoration: underline;
}

.article-link {
    color: var(--primary);
    text-decoration: none;
    font-size: 0.875rem;
    transition: var(--transition);
}

.article-link:hover {
    text-decoration: underline;
    color: var(--primary-hover);
}

/* Provider Status Display */
.provider-status-list {
    margin-top: 0.75rem;
    padding: 0.75rem;
    background: var(--bg-primary);
    border-radius: 6px;
    border: 1px solid var(--border-color);
}

.provider-status-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0;
    font-size: 0.875rem;
}

.provider-status-item:not(:last-child) {
    border-bottom: 1px solid var(--border-color);
}

.provider-icon {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

.provider-icon.pending {
    color: var(--status-queued);
}

.provider-icon.processing {
    color: var(--status-processing);
    animation: spin 1s linear infinite;
}

.provider-icon.completed {
    color: var(--status-completed);
}

.provider-icon.failed {
    color: var(--status-failed);
}

.provider-name {
    font-weight: 600;
    color: var(--text-primary);
}

.provider-message {
    color: var(--text-secondary);
    font-size: 0.8125rem;
}

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

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

/* Results Section */
.article-header-info {
    position: relative;
    margin-bottom: 1.5rem;
    padding: 1rem 1.25rem;
    background: var(--bg-secondary);
    border-radius: 8px;
    border-left: 4px solid var(--primary);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    max-height: 100%;
    overflow-y: auto;
}

[data-theme="dark"] .article-header-info {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

.article-header-main {
    display: flex;
    align-items: flex-start;
    gap: 1.5rem;
    margin-bottom: 0.75rem;
    flex-wrap: wrap;
}

.article-header-info h3 {
    margin: 0;
    color: var(--text-primary);
    flex: 1 1 100%;
    max-width: 100%;
    font-size: 1.125rem;
    word-wrap: break-word;
    overflow-wrap: break-word;
    line-height: 1.4;
}

.header-badges {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    row-gap: 0.5rem;
    flex-wrap: wrap;
    flex: 0 0 auto;
    width: auto;
}

/* Tertiary Button Style - Text + Icon (Minimal) */
.view-original-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.375rem 0.875rem;
    background: transparent;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    color: var(--text-secondary);
    font-size: 0.8125rem;
    font-weight: 500;
    text-decoration: none;
    transition: var(--transition);
    white-space: nowrap;
    flex-shrink: 0;
}

.view-original-badge:hover {
    background: var(--bg-tertiary);
    border-color: var(--text-secondary);
    color: var(--text-primary);
}

.view-original-badge i {
    width: 14px;
    height: 14px;
}

.status-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.375rem 0.875rem;
    border-radius: 6px;
    font-size: 0.8125rem;
    font-weight: 600;
    white-space: nowrap;
    border: 1px solid transparent;
    flex-shrink: 0;
    min-width: fit-content;
}

.status-success {
    background: rgba(0, 202, 142, 0.1);
    color: var(--hc-nomad);
}

[data-theme="dark"] .status-success {
    background: rgba(0, 202, 142, 0.15);
}

.status-warning {
    background: rgba(255, 216, 20, 0.15);
    color: #d4a000;
}

[data-theme="dark"] .status-warning {
    background: rgba(255, 216, 20, 0.2);
    color: var(--hc-vault);
}

.status-info {
    background: rgba(0, 172, 255, 0.1);
    color: var(--hc-packer);
}

[data-theme="dark"] .status-info {
    background: rgba(0, 172, 255, 0.15);
}

.article-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
    color: var(--text-secondary);
    font-size: 0.8125rem;
    line-height: 1.4;
}

.article-meta span {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    max-width: 100%;
    word-break: break-word;
}

.article-meta strong {
    color: var(--text-primary);
    font-weight: 600;
    white-space: nowrap;
}

/* Template text truncation with tooltip */
.template-text {
    position: relative;
    cursor: help;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}

.template-text:hover {
    color: var(--text-primary);
}

/* Custom Instructions Collapsible Section */
.custom-instructions-section {
    margin-top: 1rem;
}

.custom-instructions-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1rem;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    cursor: pointer;
    transition: var(--transition);
    user-select: none;
}

.custom-instructions-header:hover {
    background: var(--bg-secondary);
    border-color: var(--text-muted);
}

.custom-instructions-header label {
    margin: 0;
    cursor: pointer;
    font-weight: 500;
    color: var(--text-secondary);
    font-size: 0.9375rem;
}

.custom-instructions-header .collapse-icon {
    width: 18px;
    height: 18px;
    color: var(--text-secondary);
    transition: transform 0.3s ease;
    flex-shrink: 0;
}

.custom-instructions-section:not(.collapsed) .collapse-icon {
    transform: rotate(180deg);
}

.custom-instructions-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, opacity 0.3s ease, margin-top 0.3s ease;
    opacity: 0;
}

.custom-instructions-section:not(.collapsed) .custom-instructions-content {
    max-height: 300px;
    opacity: 1;
    margin-top: 0.75rem;
}

.custom-instructions-section .textarea {
    resize: vertical;
    min-height: 80px;
}

.article-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-top: 0.5rem;
}


.article-link-primary {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
    padding: 0.25rem 0.75rem;
    background: rgba(123, 66, 188, 0.1);
    border-radius: 4px;
    transition: var(--transition);
}

.article-link-primary:hover {
    background: rgba(123, 66, 188, 0.2);
    text-decoration: none;
}

.results-actions {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

/* Markdown Content */
.markdown-content {
    padding: 1.5rem;
    background: var(--bg-primary);
    border-radius: 8px;
    min-height: calc(100vh - 300px);
    overflow-y: auto;
    border: 1px solid var(--border-color);
}

.markdown-content h1,
.markdown-content h2,
.markdown-content h3 {
    margin-top: 1.5rem;
    margin-bottom: 1rem;
}

.markdown-content h1 {
    font-size: 2rem;
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 0.5rem;
}

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

.markdown-content h3 {
    font-size: 1.25rem;
}

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

.markdown-content code {
    background: var(--bg-tertiary);
    padding: 0.125rem 0.375rem;
    border-radius: 4px;
    font-family: 'JetBrains Mono', 'Fira Code', 'Monaco', 'Courier New', monospace;
    font-size: 0.875em;
    font-weight: 400;
}

.markdown-content pre {
    background: var(--bg-tertiary);
    padding: 1rem;
    border-radius: 6px;
    overflow-x: auto;
    margin: 1rem 0;
    border: 1px solid var(--border-color);
}

.markdown-content pre code {
    background: none;
    padding: 0;
    border: none;
}

.markdown-content pre code {
    background: none;
    padding: 0;
}

.markdown-content ul,
.markdown-content ol {
    margin-left: 2rem;
    margin-bottom: 1rem;
}

.markdown-content a {
    color: var(--primary);
    text-decoration: none;
}

.markdown-content a:hover {
    text-decoration: underline;
}

.markdown-content blockquote {
    border-left: 4px solid var(--primary);
    padding-left: 1rem;
    margin: 1rem 0;
    color: var(--text-secondary);
}

/* Reports List */
.reports-section {
    max-width: 100%;
    margin-top: 0;
    margin-bottom: 0;
}

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

.reports-section h2 {
    font-size: 1rem;
    margin-bottom: 0;
}

.reports-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    max-height: 400px;
    overflow-y: auto;
    padding-right: 0.5rem;
    scrollbar-gutter: stable;
}

.loading-state {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    padding: 3rem;
    color: var(--text-secondary);
}

.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 4rem 2rem;
    text-align: center;
    color: var(--text-secondary);
}

.empty-state-icon {
    width: 64px;
    height: 64px;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.empty-state h3 {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.empty-state p {
    font-size: 0.95rem;
    max-width: 400px;
}

.report-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.625rem 0.75rem;
    background: var(--bg-primary);
    border-radius: 6px;
    cursor: pointer;
    transition: var(--transition);
    border: 1px solid var(--border-color);
}

.report-item:hover {
    background: var(--bg-secondary);
    border-color: var(--primary);
    transform: translateX(2px);
}

.report-info {
    flex: 1;
}

.report-title {
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
    line-height: 1.3;
    color: var(--text-primary);
}

.report-meta {
    color: var(--text-secondary);
    font-size: 0.75rem;
    line-height: 1.4;
}

/* Reports Dashboard */
.reports-dashboard {
    grid-area: middle;
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 0;
    overflow: hidden;
    padding: 1rem;
}

.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--border-color);
    flex-wrap: wrap;
    gap: 0.75rem;
}

.dashboard-header h2 {
    font-size: 1.5rem;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-shrink: 0;
}

.dashboard-actions {
    display: flex;
    gap: 0.75rem;
    align-items: center;
    flex-wrap: wrap;
    min-width: 0;
}

.dashboard-actions select {
    min-width: 150px;
}

.dashboard-actions button {
    flex-shrink: 0;
    white-space: nowrap;
}

.user-tabs {
    display: none; /* Hidden - using dropdown instead */
}

.user-tab {
    padding: 0.5rem 1rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    color: var(--text-secondary);
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.user-tab:hover {
    background: var(--bg-tertiary);
    border-color: var(--primary);
    color: var(--text-primary);
}

.user-tab.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

.user-tab-badge {
    background: rgba(255, 255, 255, 0.2);
    padding: 0.125rem 0.5rem;
    border-radius: 12px;
    font-size: 0.75rem;
}

.user-tab-delete {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    padding: 0;
    margin-left: 0.25rem;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 4px;
    color: var(--text-secondary);
    cursor: pointer;
    transition: var(--transition);
    opacity: 0.7;
}

.user-tab-delete:hover {
    background: var(--danger);
    border-color: var(--danger);
    color: white;
    opacity: 1;
}

.user-tab.active .user-tab-delete {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.3);
    color: white;
}

.user-tab.active .user-tab-delete:hover {
    background: rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.4);
}

/* Danger button style */
.btn-danger {
    background: var(--danger);
    color: white;
    border-color: var(--danger);
}

.btn-danger:hover {
    background: #dc2626;
    border-color: #dc2626;
}

.dashboard-content {
    flex: 1;
    overflow-y: auto;
    min-height: 0;
    padding-right: 0.5rem;
    scrollbar-gutter: stable;
}

.bulk-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.625rem 0.75rem;
    background: var(--bg-secondary);
    border-radius: 6px;
    margin-bottom: 0.75rem;
    border: 1px solid var(--border-color);
}

.reports-table-container {
    overflow-x: auto;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    scrollbar-gutter: stable;
}

.reports-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--bg-primary);
}

.reports-table thead {
    background: var(--bg-secondary);
    position: sticky;
    top: 0;
    z-index: 10;
}

.reports-table th {
    padding: 0.75rem 1rem;
    text-align: left;
    font-weight: 600;
    font-size: 0.875rem;
    color: var(--text-primary);
    border-bottom: 2px solid var(--border-color);
}

.reports-table th.sortable {
    user-select: none;
    transition: var(--transition);
}

.reports-table th.sortable:hover {
    background: var(--bg-tertiary);
    color: var(--primary);
}

.reports-table td {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--border-color);
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.reports-table tbody tr:hover {
    background: var(--bg-secondary);
}

.reports-table tbody tr.selected {
    background: rgba(123, 66, 188, 0.1);
}

.status-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 500;
}

.status-badge.not-started {
    background: var(--bg-tertiary);
    color: var(--text-secondary);
}

.status-badge.in-review {
    background: rgba(0, 172, 255, 0.1);
    color: var(--info);
}

.status-badge.published {
    background: rgba(0, 202, 142, 0.1);
    color: var(--success);
}

.status-select {
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    border: 1px solid var(--border-color);
    background: var(--bg-primary);
    color: var(--text-primary);
    font-size: 0.875rem;
    cursor: pointer;
}

.user-select {
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    border: 1px solid var(--border-color);
    background: var(--bg-primary);
    color: var(--text-primary);
    font-size: 0.875rem;
    cursor: pointer;
}

/* Loading Spinner */
.loading-spinner {
    width: 24px;
    height: 24px;
    border: 3px solid var(--border-color);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.spinning {
    animation: spin 1s linear infinite;
}

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

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

/* Toast Notifications */
#toast-container {
    position: fixed;
    top: 80px;
    right: 20px;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.toast {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1rem 1.5rem;
    box-shadow: var(--card-shadow);
    min-width: 300px;
    animation: slideIn 0.3s ease;
}

.toast.success {
    border-left: 4px solid var(--success);
}

.toast.error {
    border-left: 4px solid var(--danger);
}

.toast.info {
    border-left: 4px solid var(--info);
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Footer */
.app-footer {
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-color);
    padding: 2rem 0;
    text-align: center;
    color: var(--text-secondary);
    margin-top: 3rem;
    font-size: 0.875rem;
}

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

::-webkit-scrollbar-track {
    background: var(--bg-secondary);
}

::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}

/* Settings Modal */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(4px);
}

.modal-overlay.active {
    display: flex;
}

.modal-content {
    background: var(--bg-secondary);
    border-radius: 12px;
    padding: 2rem;
    max-width: 900px;
    width: 90%;
    max-height: 85vh;
    overflow-y: auto;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    animation: modalSlideIn 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid var(--border-color);
}

[data-theme="dark"] .modal-content {
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.7);
    background: var(--bg-secondary);
}

/* Modal size variants */
.modal-content.modal-small {
    max-width: 450px;
}

.modal-content.modal-medium {
    max-width: 600px;
}

/* Modal structure */
.modal-body {
    padding: 1rem 0;
}

.modal-footer {
    padding-top: 1.5rem;
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
    border-top: 1px solid var(--border-color);
    margin-top: 1.5rem;
}

/* Notes System Styles */
#notes-history {
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 0.75rem;
}

#notes-history::-webkit-scrollbar {
    width: 8px;
}

#notes-history::-webkit-scrollbar-track {
    background: var(--bg-primary);
    border-radius: 8px;
}

#notes-history::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 8px;
}

#notes-history::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}

.note-item {
    transition: transform 0.2s ease;
}

.note-item:hover {
    transform: translateX(4px);
}

/* Smooth scrollbar styling */
.modal-content::-webkit-scrollbar {
    width: 8px;
}

.modal-content::-webkit-scrollbar-track {
    background: var(--bg-primary);
    border-radius: 12px;
}

.modal-content::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 12px;
}

.modal-content::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}

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

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

.modal-header h2 {
    margin: 0;
    color: var(--primary);
}

.modal-close {
    background: transparent;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-secondary);
    padding: 0.5rem;
    border-radius: 4px;
    transition: var(--transition);
}

.modal-close:hover {
    background: var(--bg-tertiary);
    color: var(--text-primary);
}

.modal-section {
    margin-bottom: 2rem;
}

.modal-section h3 {
    font-size: 1.125rem;
    margin-bottom: 1.25rem;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
}

.modal-section h3 svg,
.modal-section h3 i {
    width: 20px;
    height: 20px;
    opacity: 0.7;
}

/* AI Providers Grid Layout */
.providers-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(380px, 1fr));
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

@media (max-width: 768px) {
    .providers-grid {
        grid-template-columns: 1fr;
    }
}

.setting-item {
    margin-bottom: 1.5rem;
}

.setting-item label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--text-primary);
}

.setting-item small {
    display: block;
    margin-top: 0.25rem;
    color: var(--text-muted);
    font-size: 0.875rem;
}

/* Smart Input Hint */
.input-hint {
    margin-top: 0.5rem;
    padding: 0.75rem;
    background: rgba(123, 66, 188, 0.1);
    border-left: 3px solid var(--primary);
    border-radius: 4px;
    font-size: 0.875rem;
    color: var(--text-secondary);
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
}

.input-hint svg,
.input-hint i {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    margin-top: 0.1rem;
}

.input-hint strong {
    color: var(--primary);
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 0 15px;
    }
    
    .card {
        padding: 1.5rem;
    }
    
    .app-header h1 {
        font-size: 1.25rem;
    }
    
    .header-content {
        grid-template-columns: 1fr auto;
        gap: 0.5rem;
    }
    
    .header-center {
        display: none; /* Hide AI badges on mobile to save space */
    }
    
    .header-right {
        gap: 0.5rem;
    }
    
    .user-badge,
    .admin-badge {
        font-size: 0.75rem;
        padding: 0.375rem 0.625rem;
        gap: 0.375rem;
    }
    
    .user-badge i,
    .admin-badge i {
        width: 14px;
        height: 14px;
    }
    
    .provider-indicator {
        font-size: 0.75rem;
        padding: 0.3rem 0.6rem;
    }
    
    .tabs {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .button-group {
        flex-direction: column;
    }
    
    .results-actions {
        flex-direction: column;
    }
    
    #toast-container {
        right: 10px;
        left: 10px;
    }
    
    .toast {
        min-width: auto;
    }
    
    .modal-content {
        width: 95%;
        padding: 1.5rem;
    }
}

/* Collapsible Tip Section */
.tip-collapsible {
    position: relative;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 0.5rem;
}

.tip-content {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    flex: 1;
}

.tip-close-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 0.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: var(--transition);
    flex-shrink: 0;
}

.tip-close-btn:hover {
    background: rgba(0, 0, 0, 0.05);
    color: var(--text-primary);
}

[data-theme="dark"] .tip-close-btn:hover {
    background: rgba(255, 255, 255, 0.1);
}

.tip-close-btn svg,
.tip-close-btn i {
    width: 16px;
    height: 16px;
}

.tip-collapsible.hidden {
    display: none;
}

/* Custom Instructions Field */
.custom-instructions-group {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
}

.custom-instructions-group label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 500;
    color: var(--text-secondary);
}

.custom-instructions-group label svg,
.custom-instructions-group label i {
    width: 16px;
    height: 16px;
}

/* Provider Logo Badge in Article Header */
.provider-logo-badge {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    display: none;
    align-items: center;
    gap: 0.5rem;
    padding: 0.375rem 0.75rem;
    background: var(--bg-tertiary);
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-secondary);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    z-index: 10;
    pointer-events: none;
}

.provider-logo-badge.gemini {
    background: linear-gradient(135deg, rgba(66, 133, 244, 0.15), rgba(52, 168, 83, 0.15));
    color: #4285f4;
    border: 1px solid rgba(66, 133, 244, 0.3);
}

.provider-logo-badge.aws {
    background: linear-gradient(135deg, rgba(255, 153, 0, 0.15), rgba(35, 47, 62, 0.15));
    color: #FF9900;
    border: 1px solid rgba(255, 153, 0, 0.3);
}

[data-theme="dark"] .provider-logo-badge.gemini {
    background: rgba(66, 133, 244, 0.2);
    border-color: rgba(66, 133, 244, 0.4);
}

[data-theme="dark"] .provider-logo-badge.aws {
    background: rgba(255, 153, 0, 0.2);
    border-color: rgba(255, 153, 0, 0.4);
}

.provider-logo-badge svg,
.provider-logo-badge i {
    width: 16px;
    height: 16px;
}

/* Edit Button for Zendesk Search */
/* Tertiary Button Style - For Edit, View Original, etc. */
.edit-article-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.375rem 0.875rem;
    background: transparent;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    color: var(--text-secondary);
    font-size: 0.8125rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    white-space: nowrap;
    flex-shrink: 0;
}

.edit-article-btn:hover {
    background: var(--bg-tertiary);
    border-color: var(--text-secondary);
    color: var(--text-primary);
}

.edit-article-btn svg,
.edit-article-btn i {
    width: 14px;
    height: 14px;
}

/* Update header badges to accommodate edit button */
.header-badges {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

/* Reports Search */
.reports-search-container {
    position: relative;
    margin-bottom: 1rem;
}

.reports-search {
    width: 100%;
    padding-left: 2.5rem;
    font-size: 0.875rem;
}

.reports-search-container .search-icon {
    position: absolute;
    left: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    width: 16px;
    height: 16px;
    pointer-events: none;
}

.view-all-reports-btn {
    width: 100%;
    margin-top: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-size: 0.875rem;
}

.view-all-reports-btn svg,
.view-all-reports-btn i {
    width: 16px;
    height: 16px;
}

