/* Aptia ResponsePro Styles */

:root {
    --aptia-teal: #1B4B5A;
    --aptia-green: #00D084;
    --aptia-navy: #0f3460;
    --aptia-dark: #1a1a2e;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: linear-gradient(135deg, var(--aptia-dark) 0%, var(--aptia-navy) 50%, var(--aptia-teal) 100%);
    min-height: 100vh;
    margin: 0;
    padding: 0;
}

/* Header */
.app-header {
    background: linear-gradient(135deg, #708090, #2f4f4f);
    border-bottom: 3px solid var(--aptia-green);
    padding: 1.5rem 0;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.app-logo {
    height: 60px;
    width: auto;
    max-width: 300px;
    object-fit: contain;
}

.app-title {
    color: white;
    font-size: 1.8rem;
    font-weight: 700;
    margin: 0;
}

.app-subtitle {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9rem;
    margin: 0;
}

/* Main Content */
.main-content {
    padding: 2rem 0;
}

/* Cards */
.card {
    background: rgba(255, 255, 255, 0.95);
    border: none;
    border-radius: 15px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.2);
    overflow: hidden;
}

.card-header {
    background: linear-gradient(135deg, var(--aptia-teal), var(--aptia-navy));
    color: white;
    padding: 1.5rem;
    border-bottom: 3px solid var(--aptia-green);
}

.card-header h3 {
    margin: 0;
    font-size: 1.3rem;
    font-weight: 600;
}

.card-body {
    padding: 1.5rem;
}

/* Question Textarea */
.question-textarea {
    font-family: 'Courier New', monospace;
    font-size: 0.95rem;
    border: 2px solid #dee2e6;
    border-radius: 10px;
    resize: vertical;
    min-height: 400px;
}

.question-textarea:focus {
    border-color: var(--aptia-green);
    box-shadow: 0 0 0 0.2rem rgba(0, 208, 132, 0.25);
}

/* Responses Output */
.responses-output {
    min-height: 400px;
    max-height: 600px;
    overflow-y: auto;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 10px;
}

.response-item {
    background: white;
    border-left: 4px solid var(--aptia-green);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.response-question {
    font-weight: 600;
    color: var(--aptia-teal);
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.response-answer {
    color: #333;
    line-height: 1.6;
    white-space: pre-wrap;
}

.empty-state {
    text-align: center;
    padding: 3rem 1rem;
}

/* Buttons */
.btn-primary {
    background: linear-gradient(135deg, var(--aptia-green), #00b56a);
    border: none;
    font-weight: 600;
    padding: 0.75rem 2rem;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 208, 132, 0.3);
    transition: all 0.3s ease;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #00b56a, var(--aptia-green));
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 208, 132, 0.4);
}

.btn-outline-light {
    border: 2px solid rgba(255, 255, 255, 0.3);
    color: white;
    font-weight: 600;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.btn-outline-light:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--aptia-green);
    color: white;
}

.btn-success {
    background: var(--aptia-green);
    border: none;
    font-weight: 600;
}

.btn-success:hover {
    background: #00b56a;
}

/* Export Buttons */
.export-buttons .btn {
    font-size: 0.9rem;
    padding: 0.5rem 1rem;
}

/* Knowledge Card */
.knowledge-card {
    background: linear-gradient(135deg, var(--aptia-teal), var(--aptia-navy));
    border: none;
}

.knowledge-card h5 {
    font-size: 1rem;
    margin-bottom: 0.5rem;
}

.knowledge-card ul {
    font-size: 0.85rem;
    padding-left: 1.2rem;
}

/* Upload Zone */
.upload-zone {
    border: 3px dashed #dee2e6;
    border-radius: 15px;
    padding: 3rem 2rem;
    text-align: center;
    transition: all 0.3s ease;
    cursor: pointer;
}

.upload-zone:hover {
    border-color: var(--aptia-green);
    background: rgba(0, 208, 132, 0.05);
}

.upload-zone.dragover {
    border-color: var(--aptia-green);
    background: rgba(0, 208, 132, 0.1);
}

/* Uploaded Files List */
.uploaded-file-item {
    background: #f8f9fa;
    border-left: 4px solid var(--aptia-green);
    padding: 1rem;
    margin-bottom: 0.5rem;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.uploaded-file-item .file-info {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.uploaded-file-item .file-icon {
    font-size: 1.5rem;
    color: var(--aptia-green);
}

/* History List */
.history-item {
    background: #f8f9fa;
    border-left: 4px solid var(--aptia-teal);
    padding: 1.5rem;
    margin-bottom: 1rem;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.history-item:hover {
    background: #e9ecef;
    border-left-color: var(--aptia-green);
}

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

.history-item-title {
    font-weight: 600;
    color: var(--aptia-teal);
}

.history-item-date {
    font-size: 0.85rem;
    color: #6c757d;
}

.history-item-preview {
    font-size: 0.9rem;
    color: #6c757d;
}

/* Loading Overlay */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.loading-overlay .spinner-border {
    width: 4rem;
    height: 4rem;
    border-width: 0.4rem;
}

/* Modal Customization */
.modal-content {
    border-radius: 15px;
    border: none;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

.modal-header {
    background: linear-gradient(135deg, var(--aptia-teal), var(--aptia-navy));
    color: white;
    border-bottom: 3px solid var(--aptia-green);
    border-radius: 15px 15px 0 0;
}

.modal-header .btn-close {
    filter: invert(1);
}

/* Responsive */
@media (max-width: 992px) {
    .app-header .d-flex {
        flex-direction: column;
        gap: 1rem;
    }
    
    .question-textarea {
        min-height: 300px;
    }
    
    .responses-output {
        min-height: 300px;
        max-height: 400px;
    }
}
