.summary-manager-container,
.summary-editor-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: #f8fafc;
    overflow-y: auto;
    z-index: 9998;
    padding: 0;
}

.summary-manager {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
}

.summary-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid #e2e8f0;
}

.summary-header-left h2 {
    margin: 0 0 5px 0;
    font-size: 28px;
    color: #1e293b;
}

.summary-count {
    color: #64748b;
    font-size: 14px;
    margin: 0;
}

.empty-state {
    text-align: center;
    padding: 80px 20px;
}

.empty-icon {
    font-size: 64px;
    margin-bottom: 20px;
}

.empty-state h3 {
    font-size: 24px;
    color: #1e293b;
    margin-bottom: 10px;
}

.empty-state p {
    color: #64748b;
    font-size: 16px;
    margin-bottom: 30px;
}

.summary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 24px;
}

.summary-card {
    background: white;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.2s ease;
}

.summary-card:hover {
    border-color: #667eea;
    box-shadow: 0 8px 24px rgba(102, 126, 234, 0.15);
    transform: translateY(-2px);
}

.summary-card-thumbnails {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2px;
    background: #e2e8f0;
    min-height: 200px;
}

.summary-card-thumbnails.empty {
    grid-template-columns: 1fr;
    place-items: center;
    background: #f1f5f9;
}

.summary-thumbnail {
    position: relative;
    overflow: hidden;
    background: white;
}

.summary-thumbnail img {
    width: 100%;
    height: 120px;
    object-fit: contain;
    padding: 10px;
}

.summary-thumbnail-empty {
    font-size: 64px;
    opacity: 0.3;
    padding: 60px;
}

.summary-card-content {
    padding: 20px;
}

.summary-card-title {
    font-size: 18px;
    font-weight: 600;
    color: #1e293b;
    margin: 0 0 8px 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.summary-card-description {
    font-size: 14px;
    color: #64748b;
    margin: 0 0 15px 0;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.summary-card-meta {
    display: flex;
    gap: 15px;
    margin-bottom: 15px;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 13px;
    color: #64748b;
}

.meta-icon {
    font-size: 16px;
}

.summary-card-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.summary-card-actions button {
    flex: 1;
    min-width: 100px;
}

.btn-icon {
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    padding: 8px;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.btn-icon:hover {
    background: #fee2e2;
}

.btn-large {
    padding: 12px 32px;
    font-size: 16px;
}

@media (max-width: 768px) {
    .summary-grid {
        grid-template-columns: 1fr;
    }
    
    .summary-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    
    .summary-card-actions {
        flex-direction: column;
    }
    
    .summary-card-actions button {
        width: 100%;
    }
}

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
}

.add-to-summary-modal {
    background: white;
    border-radius: 12px;
    max-width: 700px;
    width: 90%;
    max-height: 85vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

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

.modal-header h2 {
    margin: 0;
    font-size: 24px;
    color: #1e293b;
}

.modal-close {
    background: none;
    border: none;
    font-size: 32px;
    color: #94a3b8;
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    line-height: 32px;
    text-align: center;
    transition: color 0.2s;
}

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

.modal-body {
    padding: 24px;
}

.modal-footer {
    padding: 16px 24px;
    border-top: 1px solid #e2e8f0;
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

.chart-preview {
    display: flex;
    gap: 20px;
    padding: 20px;
    background: #f8fafc;
    border-radius: 8px;
    margin-bottom: 24px;
}

.chart-preview img {
    width: 200px;
    height: 150px;
    object-fit: contain;
    border-radius: 4px;
    background: white;
}

.chart-preview-info h3 {
    margin: 0 0 8px 0;
    font-size: 18px;
    color: #1e293b;
}

.chart-meta {
    color: #64748b;
    font-size: 14px;
}

.summary-selection h3,
.new-summary-section h3 {
    font-size: 16px;
    font-weight: 600;
    color: #1e293b;
    margin: 0 0 16px 0;
}

.empty-summaries {
    text-align: center;
    padding: 40px 20px;
    color: #64748b;
}

.empty-summaries .hint {
    font-size: 14px;
    margin-top: 8px;
}

.summaries-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 32px;
}

.summary-option {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px;
    background: #f8fafc;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    transition: all 0.2s;
}

.summary-option:hover {
    border-color: #667eea;
    background: #f1f5f9;
}

.summary-option-info h4 {
    margin: 0 0 4px 0;
    font-size: 16px;
    color: #1e293b;
}

.summary-option-meta {
    font-size: 14px;
    color: #64748b;
    margin: 0;
}

.btn-add-to-summary {
    background: #667eea;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 6px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-add-to-summary:hover {
    background: #5568d3;
}

.new-summary-section {
    border-top: 1px solid #e2e8f0;
    padding-top: 24px;
    margin-top: 24px;
}

.new-summary-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.input-field,
.textarea-field {
    padding: 12px;
    border: 2px solid #e2e8f0;
    border-radius: 6px;
    font-size: 14px;
    font-family: inherit;
    transition: border-color 0.2s;
}

.input-field:focus,
.textarea-field:focus {
    outline: none;
    border-color: #667eea;
}

.textarea-field {
    resize: vertical;
    min-height: 80px;
}

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

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

.api-key-settings-dialog {
    background: white;
    border-radius: 12px;
    max-width: 650px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.api-key-info {
    background: #f0f9ff;
    border: 2px solid #bfdbfe;
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 24px;
}

.api-key-info h3 {
    margin: 0 0 8px 0;
    font-size: 16px;
    color: #1e40af;
}

.api-key-info p {
    margin: 0 0 8px 0;
    color: #1e3a8a;
    font-size: 14px;
}

.info-hint {
    background: #dbeafe;
    padding: 8px 12px;
    border-radius: 4px;
    margin-top: 12px;
    font-size: 13px;
}

.api-key-form {
    margin-bottom: 24px;
}

.api-key-form h3 {
    font-size: 16px;
    font-weight: 600;
    color: #1e293b;
    margin: 0 0 16px 0;
}

.current-key-display {
    background: #f8fafc;
    padding: 16px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.current-key-display label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: #475569;
    margin-bottom: 8px;
}

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

.key-display-field code {
    flex: 1;
    background: white;
    padding: 10px 12px;
    border-radius: 4px;
    border: 1px solid #e2e8f0;
    font-family: 'Courier New', monospace;
    font-size: 13px;
    color: #1e293b;
}

.key-status {
    padding: 4px 12px;
    border-radius: 4px;
    font-size: 13px;
    font-weight: 500;
}

.key-status.success {
    background: #dcfce7;
    color: #166534;
}

.no-key-message {
    background: #fef3c7;
    border: 2px solid #fbbf24;
    padding: 12px 16px;
    border-radius: 6px;
    margin-bottom: 20px;
}

.no-key-message p {
    margin: 0;
    color: #92400e;
    font-weight: 500;
}

.form-group {
    margin-bottom: 20px;
    position: relative;
}

.form-group label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: #1e293b;
    margin-bottom: 8px;
}

.api-key-input {
    width: 100%;
    padding: 12px 80px 12px 12px;
    border: 2px solid #e2e8f0;
    border-radius: 6px;
    font-size: 14px;
    font-family: 'Courier New', monospace;
    transition: border-color 0.2s;
}

.api-key-input:focus {
    outline: none;
    border-color: #667eea;
}

.btn-toggle-visibility {
    position: absolute;
    right: 8px;
    bottom: 8px;
    background: #f1f5f9;
    border: 1px solid #cbd5e1;
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 12px;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-toggle-visibility:hover {
    background: #e2e8f0;
}

.form-actions {
    display: flex;
    gap: 12px;
}

.btn-danger {
    background: #dc2626;
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 6px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-danger:hover {
    background: #b91c1c;
}

.api-key-help {
    border-top: 1px solid #e2e8f0;
    padding-top: 24px;
}

.api-key-help h3,
.api-key-help h4 {
    font-size: 16px;
    font-weight: 600;
    color: #1e293b;
    margin: 0 0 12px 0;
}

.api-key-help ol {
    margin: 0 0 20px 0;
    padding-left: 24px;
}

.api-key-help ol li {
    margin-bottom: 8px;
    color: #475569;
    font-size: 14px;
}

.api-key-help a {
    color: #667eea;
    text-decoration: none;
    font-weight: 500;
}

.api-key-help a:hover {
    text-decoration: underline;
}

.api-key-help code {
    background: #f1f5f9;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 13px;
    font-family: 'Courier New', monospace;
}

.pricing-info {
    background: #f0fdf4;
    border: 2px solid #86efac;
    padding: 16px;
    border-radius: 8px;
    margin-top: 20px;
}

.pricing-info h4 {
    margin: 0 0 8px 0;
    color: #166534;
}

.pricing-info ul {
    margin: 0;
    padding-left: 20px;
}

.pricing-info ul li {
    color: #166534;
    font-size: 14px;
    margin-bottom: 4px;
}

.export-dialog-modal {
    background: white;
    border-radius: 12px;
    max-width: 600px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.export-summary-info {
    background: #f8fafc;
    padding: 16px;
    border-radius: 8px;
    margin-bottom: 24px;
}

.export-summary-info h3 {
    margin: 0 0 12px 0;
    font-size: 18px;
    color: #1e293b;
}

.export-summary-stats {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

.stat-item {
    padding: 6px 12px;
    background: white;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    color: #475569;
}

.status-complete {
    background: #dcfce7;
    color: #166534;
}

.status-incomplete {
    background: #fef3c7;
    color: #92400e;
}

.export-format-selection h3,
.export-options h3 {
    font-size: 16px;
    font-weight: 600;
    color: #1e293b;
    margin: 0 0 16px 0;
}

.format-options {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 24px;
}

.format-option {
    cursor: pointer;
}

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

.format-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    background: #f8fafc;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    transition: all 0.2s;
}

.format-option input[type="radio"]:checked + .format-card {
    border-color: #667eea;
    background: #f1f5f9;
}

.format-card:hover {
    border-color: #cbd5e1;
}

.format-icon {
    font-size: 32px;
}

.format-info h4 {
    margin: 0 0 4px 0;
    font-size: 14px;
    font-weight: 600;
    color: #1e293b;
}

.format-info p {
    margin: 0;
    font-size: 12px;
    color: #64748b;
}

.export-options {
    margin-bottom: 24px;
}

.option-checkbox-label {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px;
    margin-bottom: 8px;
    background: #f8fafc;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.2s;
}

.option-checkbox-label:hover {
    background: #f1f5f9;
}

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

.option-checkbox-label input[type="checkbox"]:disabled {
    cursor: not-allowed;
    opacity: 0.5;
}

.option-checkbox-label span {
    font-size: 14px;
    color: #1e293b;
    font-weight: 500;
}

.export-warning {
    background: #fef3c7;
    border: 2px solid #fbbf24;
    padding: 16px;
    border-radius: 8px;
    margin-bottom: 24px;
}

.export-warning h4 {
    margin: 0 0 8px 0;
    font-size: 14px;
    font-weight: 600;
    color: #92400e;
}

.export-warning ul {
    margin: 0 0 8px 0;
    padding-left: 20px;
}

.export-warning ul li {
    color: #92400e;
    font-size: 13px;
    margin-bottom: 4px;
}

.export-warning p {
    margin: 0;
    font-size: 13px;
    color: #92400e;
}

.summary-editor {
    max-width: 1600px;
    margin: 0 auto;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 24px;
    min-height: 100vh;
}

.summary-editor-header {
    background: white;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.btn-back {
    background: #f1f5f9;
    color: #475569;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    align-self: flex-start;
}

.btn-back:hover {
    background: #e2e8f0;
}

.summary-editor-title-section {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.summary-title-input {
    font-size: 24px;
    font-weight: 600;
    border: 2px solid transparent;
    padding: 12px;
    border-radius: 8px;
    background: #f8fafc;
    transition: all 0.2s;
}

.summary-title-input:focus {
    outline: none;
    border-color: #667eea;
    background: white;
}

.summary-description-input {
    font-size: 14px;
    border: 2px solid transparent;
    padding: 12px;
    border-radius: 8px;
    background: #f8fafc;
    transition: all 0.2s;
    resize: vertical;
    min-height: 60px;
    font-family: inherit;
}

.summary-description-input:focus {
    outline: none;
    border-color: #667eea;
    background: white;
}

.summary-editor-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.summary-editor-content {
    display: grid;
    grid-template-columns: 400px 1fr;
    gap: 24px;
    align-items: start;
}

.summary-editor-sidebar {
    background: white;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    position: sticky;
    top: 20px;
    max-height: calc(100vh - 40px);
    display: flex;
    flex-direction: column;
}

.summary-editor-sidebar h3 {
    margin: 0 0 16px 0;
    font-size: 18px;
    color: #1e293b;
}

.summary-charts-list {
    flex: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.empty-charts {
    text-align: center;
    padding: 40px 20px;
    color: #94a3b8;
    font-size: 14px;
}

.chart-item {
    background: #f8fafc;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    padding: 12px;
    display: flex;
    align-items: center;
    gap: 12px;
    transition: all 0.2s;
    cursor: move;
}

.chart-item:hover {
    border-color: #cbd5e1;
    background: #f1f5f9;
}

.drag-handle {
    font-size: 20px;
    color: #cbd5e1;
    cursor: grab;
}

.drag-handle:active {
    cursor: grabbing;
}

.sortable-ghost {
    opacity: 0.4;
    background: #dbeafe;
}

.chart-item-thumbnail {
    width: 80px;
    height: 60px;
    background: white;
    border-radius: 4px;
    overflow: hidden;
    flex-shrink: 0;
}

.chart-item-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

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

.chart-item-title {
    font-size: 14px;
    font-weight: 600;
    color: #1e293b;
    margin: 0 0 4px 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.chart-item-meta {
    display: flex;
    gap: 8px;
}

.meta-badge {
    padding: 2px 8px;
    background: #e0e7ff;
    color: #4338ca;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 500;
}

.chart-item-analysis {
    margin-top: 8px;
}

.analysis-badge {
    padding: 4px 10px;
    background: #dcfce7;
    color: #166534;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
}

.btn-analyze-chart {
    background: #667eea;
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 12px;
    cursor: pointer;
    margin-top: 8px;
}

.btn-analyze-chart:hover {
    background: #5568d3;
}

.btn-delete-chart {
    background: none;
    border: none;
    font-size: 18px;
    color: #cbd5e1;
    cursor: pointer;
    padding: 4px;
    transition: color 0.2s;
}

.btn-delete-chart:hover {
    color: #ef4444;
}

.summary-editor-main {
    background: white;
    border-radius: 12px;
    padding: 32px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    min-height: 600px;
}

.executive-summary-placeholder {
    text-align: center;
    padding: 80px 20px;
}

.placeholder-icon {
    font-size: 64px;
    margin-bottom: 20px;
    opacity: 0.5;
}

.executive-summary-placeholder h3 {
    font-size: 24px;
    color: #1e293b;
    margin: 0 0 12px 0;
}

.executive-summary-placeholder p {
    color: #64748b;
    margin: 0 0 24px 0;
}

.placeholder-hint {
    color: #f59e0b !important;
    font-weight: 500;
}

.executive-summary-section {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.executive-summary-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 16px;
    border-bottom: 2px solid #e2e8f0;
}

.executive-summary-header h2 {
    margin: 0;
    font-size: 28px;
    color: #1e293b;
}

.executive-summary-content {
    display: flex;
    flex-direction: column;
    gap: 32px;
}

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

.summary-section h3 {
    font-size: 20px;
    font-weight: 600;
    color: #1e293b;
    margin: 0;
}

.editable-content {
    padding: 16px;
    background: #f8fafc;
    border: 2px solid transparent;
    border-radius: 8px;
    min-height: 100px;
    line-height: 1.6;
    transition: all 0.2s;
}

.editable-content:focus {
    outline: none;
    border-color: #667eea;
    background: white;
}

.findings-list,
.recommendations-list {
    margin: 0;
    padding-left: 24px;
}

.findings-list li,
.recommendations-list li {
    margin-bottom: 8px;
    color: #475569;
    line-height: 1.6;
}

.charts-detail-list {
    display: flex;
    flex-direction: column;
    gap: 32px;
}

.chart-detail-item {
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    padding: 24px;
    background: #fafafa;
}

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

.chart-number {
    font-size: 24px;
    font-weight: 700;
    color: #667eea;
}

.chart-detail-header h4 {
    margin: 0;
    font-size: 18px;
    color: #1e293b;
}

.chart-detail-image {
    background: white;
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 16px;
}

.chart-detail-image img {
    width: 100%;
    height: auto;
    max-height: 400px;
    object-fit: contain;
}

.chart-detail-analysis {
    padding: 16px;
    background: white;
    border-radius: 8px;
    border-left: 4px solid #667eea;
}

.chart-detail-analysis p {
    margin: 0;
    line-height: 1.6;
    color: #475569;
}

.no-analysis {
    color: #94a3b8;
    font-style: italic;
}

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

.prompt-editor-modal {
    background: white;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    max-width: 900px;
    width: 100%;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.prompt-editor-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 24px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.prompt-editor-header h2 {
    margin: 0;
    font-size: 22px;
}

.prompt-editor-close {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    font-size: 24px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.prompt-editor-close:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: rotate(90deg);
}

.prompt-editor-body {
    padding: 30px;
    overflow-y: auto;
    flex: 1;
}

.chart-preview-section {
    margin-bottom: 24px;
    padding-bottom: 24px;
    border-bottom: 2px solid #e2e8f0;
}

.chart-preview-section h3 {
    margin: 0 0 12px 0;
    font-size: 14px;
    font-weight: 600;
    color: #64748b;
    text-transform: uppercase;
}

.chart-preview-info {
    display: flex;
    gap: 16px;
    align-items: center;
}

.chart-preview-thumb {
    width: 120px;
    height: 80px;
    object-fit: contain;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    background: white;
}

.chart-preview-meta h4 {
    margin: 0 0 4px 0;
    font-size: 16px;
    color: #1e293b;
}

.chart-preview-meta p {
    margin: 0;
    font-size: 14px;
    color: #64748b;
}

.template-selector-section {
    margin-bottom: 24px;
}

.template-selector-section label {
    display: block;
    margin-bottom: 8px;
    color: #1e293b;
    font-size: 14px;
}

.prompt-template-select {
    width: 100%;
    padding: 12px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 14px;
    background: white;
    cursor: pointer;
    transition: all 0.2s ease;
}

.prompt-template-select:hover {
    border-color: #667eea;
}

.prompt-template-select:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.template-description {
    margin-top: 8px;
    padding: 12px;
    background: #f8fafc;
    border-left: 3px solid #667eea;
    border-radius: 4px;
    font-size: 14px;
    color: #475569;
    display: none;
}

.prompt-editor-section {
    margin-bottom: 24px;
}

.prompt-editor-section label {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
    color: #1e293b;
    font-size: 14px;
}

.prompt-help {
    font-size: 12px;
    color: #94a3b8;
    font-weight: normal;
}

.custom-prompt-textarea {
    width: 100%;
    padding: 16px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 14px;
    font-family: 'Monaco', 'Menlo', monospace;
    line-height: 1.6;
    resize: vertical;
    transition: all 0.2s ease;
}

.custom-prompt-textarea:hover {
    border-color: #cbd5e0;
}

.custom-prompt-textarea:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.prompt-char-count {
    text-align: right;
    font-size: 12px;
    color: #94a3b8;
    margin-top: 4px;
}

.current-analysis-section {
    margin-top: 24px;
    padding-top: 24px;
    border-top: 2px solid #e2e8f0;
}

.current-analysis-section h3 {
    margin: 0 0 12px 0;
    font-size: 14px;
    font-weight: 600;
    color: #64748b;
}

.current-analysis-text {
    padding: 16px;
    background: #f8fafc;
    border-left: 4px solid #10b981;
    border-radius: 4px;
    line-height: 1.6;
    color: #475569;
}

.prompt-editor-footer {
    padding: 20px 30px;
    background: #f8fafc;
    border-top: 2px solid #e2e8f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer-actions {
    display: flex;
    gap: 12px;
}

.custom-prompt-badge {
    display: inline-block;
    background: #f59e0b;
    color: white;
    font-size: 11px;
    padding: 2px 6px;
    border-radius: 4px;
    margin-left: 4px;
}

.btn-edit-prompt {
    background: transparent;
    border: 1px solid #e2e8f0;
    color: #64748b;
    padding: 4px 8px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s ease;
    margin-left: auto;
}

.btn-edit-prompt:hover {
    background: #667eea;
    border-color: #667eea;
    color: white;
}

/* Document Library */
.document-library-section {
    margin-top: 30px;
    padding-top: 30px;
    border-top: 2px solid #e2e8f0;
}

.document-library-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.document-library-header h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    color: #1e293b;
}

.doc-count {
    background: #667eea;
    color: white;
    font-size: 12px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 12px;
}

.btn-full-width {
    width: 100%;
    margin-bottom: 16px;
}

.documents-list {
    margin-top: 12px;
}

.document-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    margin-bottom: 8px;
    transition: all 0.2s ease;
}

.document-item:hover {
    border-color: #cbd5e0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.doc-icon {
    font-size: 24px;
    flex-shrink: 0;
}

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

.doc-name {
    font-size: 14px;
    font-weight: 500;
    color: #1e293b;
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.doc-meta {
    font-size: 12px;
    color: #64748b;
}

.btn-icon {
    background: transparent;
    border: none;
    font-size: 18px;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.btn-icon:hover {
    background: #fee2e2;
}

.empty-docs-hint {
    font-size: 13px;
    color: #94a3b8;
    text-align: center;
    padding: 20px;
    line-height: 1.6;
}

.loading-message {
    padding: 12px;
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    border-radius: 8px;
    color: #1e40af;
    font-size: 13px;
    margin-top: 12px;
    text-align: center;
}

/* Editable Content Styles */
.editable-content,
.editable-list {
    cursor: text;
    transition: all 0.2s ease;
    border-radius: 4px;
    padding: 8px;
    min-height: 40px;
}

.editable-content:hover,
.editable-list:hover {
    background: rgba(102, 126, 234, 0.05);
    outline: 1px dashed rgba(102, 126, 234, 0.3);
}

.editable-content:focus,
.editable-list:focus {
    outline: 2px solid #667eea;
    background: white;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.editable-content[contenteditable="true"]:empty::before,
.editable-list[contenteditable="true"]:empty::before {
    content: attr(placeholder);
    color: #94a3b8;
    font-style: italic;
}

.editable-list li {
    margin-bottom: 8px;
    padding: 4px 0;
}

.editable-list li:hover {
    background: rgba(102, 126, 234, 0.05);
    border-radius: 4px;
    padding-left: 8px;
}

@media (max-width: 1024px) {
    .summary-editor-content {
        grid-template-columns: 1fr;
    }
    
    .summary-editor-sidebar {
        position: static;
        max-height: none;
    }
}
