/* 문서 이미지 자동 첨부 데모 스타일 */

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: #333;
}

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

/* Header */
header {
    background: white;
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 24px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    text-align: center;
}

header h1 {
    color: #5a67d8;
    margin-bottom: 8px;
}

header p {
    color: #718096;
    font-size: 14px;
}

/* Main Content */
.main-content {
    display: grid;
    grid-template-columns: 400px 1fr;
    gap: 24px;
    height: calc(100vh - 200px);
}

/* Left Panel */
.left-panel {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.upload-section {
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.upload-section h2 {
    font-size: 18px;
    margin-bottom: 16px;
    color: #2d3748;
}

.upload-area {
    border: 2px dashed #cbd5e0;
    border-radius: 8px;
    padding: 32px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.upload-area:hover {
    border-color: #5a67d8;
    background: #f7fafc;
}

.upload-area.drag-over {
    border-color: #5a67d8;
    background: #edf2f7;
}

.upload-placeholder svg {
    color: #a0aec0;
    margin-bottom: 12px;
}

.upload-placeholder p {
    color: #718096;
    font-size: 14px;
}

/* Demo Files */
.demo-files-section {
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.demo-files-section h3 {
    font-size: 16px;
    margin-bottom: 12px;
    color: #2d3748;
}

.demo-files-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.demo-file-item {
    padding: 8px 12px;
    background: #f7fafc;
    border-radius: 6px;
    font-size: 14px;
    cursor: pointer;
    transition: background 0.2s;
}

.demo-file-item:hover {
    background: #edf2f7;
}

/* Status */
.status-section {
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.status-section h3 {
    font-size: 16px;
    margin-bottom: 12px;
    color: #2d3748;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: #e2e8f0;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 12px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #5a67d8, #667eea);
    transition: width 0.3s ease;
    border-radius: 4px;
}

.status-message {
    font-size: 14px;
    color: #718096;
}

/* Right Panel */
.right-panel {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
}

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

.chat-header h2 {
    font-size: 18px;
    color: #2d3748;
}

.ai-indicators {
    display: flex;
    gap: 12px;
}

.ai-indicator {
    padding: 4px 12px;
    background: #f7fafc;
    border-radius: 20px;
    font-size: 13px;
    color: #718096;
    transition: all 0.3s;
}

.ai-indicator.active {
    background: #5a67d8;
    color: white;
}

/* Chat Container */
.chat-container {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.chat-message {
    display: flex;
    gap: 12px;
    animation: slideIn 0.3s ease;
}

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

.message-content {
    flex: 1;
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 14px;
    line-height: 1.6;
}

.chat-message.system .message-content {
    background: #f7fafc;
    border: 1px solid #e2e8f0;
}

.chat-message.supervisor .message-content {
    background: #edf2f7;
    border-left: 4px solid #5a67d8;
}

.chat-message.worker .message-content {
    background: #f0fff4;
    border-left: 4px solid #48bb78;
}

.chat-message strong {
    color: #2d3748;
    display: block;
    margin-bottom: 4px;
}

.chat-message ul {
    margin-top: 8px;
    margin-left: 20px;
}

.chat-message li {
    margin-bottom: 4px;
}

/* Action Buttons */
.action-buttons {
    padding: 20px;
    border-top: 1px solid #e2e8f0;
    display: flex;
    gap: 12px;
    justify-content: flex-end;
}

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

.btn-primary {
    background: #5a67d8;
    color: white;
}

.btn-primary:hover:not(:disabled) {
    background: #4c51bf;
    transform: translateY(-1px);
}

.btn-secondary {
    background: #e2e8f0;
    color: #4a5568;
}

.btn-secondary:hover {
    background: #cbd5e0;
}

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

/* Loading Animation */
.loading-dots {
    display: inline-flex;
    gap: 4px;
}

.loading-dots span {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #5a67d8;
    animation: bounce 1.4s ease-in-out infinite;
}

.loading-dots span:nth-child(1) {
    animation-delay: -0.32s;
}

.loading-dots span:nth-child(2) {
    animation-delay: -0.16s;
}

@keyframes bounce {
    0%, 80%, 100% {
        transform: scale(0);
        opacity: 0.5;
    }
    40% {
        transform: scale(1);
        opacity: 1;
    }
}

/* Error State */
.error-message {
    background: #fed7d7;
    border: 1px solid #fc8181;
    color: #c53030;
    padding: 12px;
    border-radius: 6px;
    margin-top: 12px;
}

/* Success State */
.success-message {
    background: #c6f6d5;
    border: 1px solid #68d391;
    color: #22543d;
    padding: 12px;
    border-radius: 6px;
    margin-top: 12px;
}

/* Responsive */
@media (max-width: 1024px) {
    .main-content {
        grid-template-columns: 1fr;
        height: auto;
    }

    .left-panel {
        order: 2;
    }

    .right-panel {
        order: 1;
        min-height: 500px;
    }
}

@media (max-width: 640px) {
    .container {
        padding: 10px;
    }

    header {
        padding: 16px;
    }

    .main-content {
        gap: 16px;
    }
}