/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI', Oxygen, Ubuntu, Cantarell, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: #333;
    line-height: 1.6;
}

/* App Container */
#app {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* App Header */
.app-header {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    padding: 16px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    overflow: visible;
}

.app-title {
    color: white;
    font-size: 1.75rem;
    font-weight: 600;
    margin: 0;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    letter-spacing: 0.5px;
}

.btn-logout {
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.btn-logout:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

/* Breadcrumbs */
.breadcrumbs {
    background: rgba(255, 255, 255, 0.15);
    padding: 12px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    position: relative;
    z-index: 1;
}

.breadcrumb-link {
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    font-size: 14px;
    transition: color 0.3s ease;
}

.breadcrumb-link:hover {
    color: white;
    text-decoration: underline;
}

.breadcrumb-separator {
    color: rgba(255, 255, 255, 0.6);
    margin: 0 8px;
}

.breadcrumb-current {
    color: white;
    font-weight: 500;
    font-size: 14px;
}

/* Main Content */
.main-content {
    flex: 1;
    background: white;
    margin: 0;
    min-height: calc(100vh - 120px);
}

/* Common Button Styles */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    white-space: nowrap;
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.btn-primary {
    background: #667eea;
    color: white;
}

.btn-primary:hover:not(:disabled) {
    background: #5a6fd8;
    transform: translateY(-1px);
}

.btn-secondary {
    background: #6c757d;
    color: white;
}

.btn-secondary:hover:not(:disabled) {
    background: #5a6268;
}

.btn-danger {
    background: #dc3545;
    color: white;
}

.btn-danger:hover:not(:disabled) {
    background: #c82333;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 12px;
}

.btn-icon {
    padding: 8px;
    background: transparent;
    border: 1px solid #ddd;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-icon:hover {
    background: #f8f9fa;
    border-color: #667eea;
}

/* Font Awesome Icons - No longer needed, using inline <i> tags */

/* Loading Spinner */
.loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px;
    background: rgba(255, 255, 255, 0.9);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1000;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 16px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
}

.modal-content {
    background-color: white;
    margin: 5% auto;
    border-radius: 12px;
    width: 90%;
    max-width: 600px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
    animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 1px solid #e9ecef;
}

.modal-header h2 {
    margin: 0;
    color: #495057;
    font-size: 1.5rem;
    font-weight: 600;
}

.modal-close {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #6c757d;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.modal-close:hover {
    background: #f8f9fa;
    color: #495057;
}

.modal-body {
    padding: 24px;
}

/* Form Styles */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 6px;
    font-weight: 500;
    color: #495057;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e9ecef;
    border-radius: 6px;
    font-size: 14px;
    transition: border-color 0.3s ease;
    font-family: inherit;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: #667eea;
}

.form-group textarea {
    resize: vertical;
    min-height: 100px;
}

.form-help {
    margin-top: 4px;
}

.form-help small {
    color: #6c757d;
    font-size: 12px;
}

.form-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    margin-top: 24px;
}

/* Question Priming Styles */
#questionPriming {
    background-color: #f8f9fa;
    border: 1px solid #e9ecef;
}

#questionPriming:focus {
    background-color: white;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

/* Status Text Styling */
.status-text {
    font-size: 13px;
    font-weight: 500;
    transition: color 0.3s ease;
}

.status-text.saved {
    color: #28a745;
}

.status-text.unsaved {
    color: #ffc107;
}

.status-text.saving {
    color: #667eea;
}

.status-text.error {
    color: #dc3545;
}

/* Projects List Page */
.projects-page {
    padding: 24px;
    max-width: 1200px;
    margin: 0 auto;
}

.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 32px;
}

.page-header h1 {
    color: #495057;
    font-size: 2.5rem;
    font-weight: 300;
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 24px;
}

.project-card {
    background: white;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    border: 1px solid #e9ecef;
}

.project-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 16px;
}

.project-name {
    color: #495057;
    font-size: 1.25rem;
    font-weight: 600;
    margin: 0;
    flex: 1;
}

.project-actions {
    display: flex;
    gap: 8px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.project-card:hover .project-actions {
    opacity: 1;
}

.project-description {
    color: #6c757d;
    margin-bottom: 16px;
    line-height: 1.5;
}

.project-meta {
    margin-bottom: 20px;
}

.project-date {
    color: #6c757d;
    font-size: 12px;
    margin-bottom: 4px;
}

.project-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #6c757d;
    grid-column: 1 / -1;
}

.empty-state .empty-icon {
    font-size: 4rem;
    margin-bottom: 16px;
}

.empty-state h3 {
    margin-bottom: 8px;
    color: #495057;
}

.empty-state p {
    margin-bottom: 24px;
    font-size: 16px;
}

/* Project Detail Layout */
.project-detail-page {
    height: 100vh;
    display: flex;
    flex-direction: column;
}

.project-layout {
    display: flex;
    flex: 1;
    height: 100%;
}

.sidebar {
    width: 280px;
    background: #f8f9fa;
    border-right: 1px solid #e9ecef;
    display: flex;
    flex-direction: column;
}

.sidebar-header {
    padding: 24px;
    border-bottom: 1px solid #e9ecef;
}

.sidebar-header h2 {
    color: #495057;
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 8px;
}

.project-description {
    color: #6c757d;
    font-size: 14px;
    line-height: 1.4;
}

.sidebar-nav {
    flex: 1;
    padding: 16px 0;
}

.nav-menu {
    list-style: none;
}

.nav-item {
    margin-bottom: 4px;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 24px;
    color: #6c757d;
    text-decoration: none;
    transition: all 0.3s ease;
    border-right: 3px solid transparent;
}

.nav-link:hover {
    background: #e9ecef;
    color: #495057;
}

.nav-link.active {
    background: #e3f2fd;
    color: #667eea;
    border-right-color: #667eea;
    font-weight: 500;
}

.content-area {
    flex: 1;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    width: 100%;
}

/* Project Brief Page */
.project-brief-page {
    padding: 24px;
    max-width: 1000px;
    margin: 0 auto;
    width: 100%;
    overflow-y: auto;
    flex: 1;
}

.brief-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.brief-header h2 {
    color: #495057;
    font-size: 1.75rem;
    font-weight: 600;
}

.brief-actions {
    display: flex;
    align-items: center;
    gap: 16px;
}

.save-status {
    font-size: 14px;
}

.status-text.saved {
    color: #28a745;
}

.status-text.unsaved {
    color: #ffc107;
}

.brief-editor {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.editor-toolbar {
    display: flex;
    gap: 16px;
    padding: 12px 16px;
    background: #f8f9fa;
    border-bottom: 1px solid #e9ecef;
}

.toolbar-group {
    display: flex;
    gap: 4px;
}

.toolbar-btn {
    padding: 8px 12px;
    background: white;
    border: 1px solid #ddd;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    transition: all 0.3s ease;
}

.toolbar-btn:hover {
    background: #e9ecef;
    border-color: #667eea;
}

.editor-container {
    padding: 0;
}

.brief-textarea {
    width: 100%;
    border: none;
    padding: 24px;
    font-size: 14px;
    line-height: 1.6;
    resize: none;
    font-family: inherit;
}

.brief-textarea:focus {
    outline: none;
}

.editor-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 24px;
    background: #f8f9fa;
    border-top: 1px solid #e9ecef;
    font-size: 12px;
    color: #6c757d;
}

.word-count {
    display: flex;
    gap: 8px;
    align-items: center;
}

.separator {
    color: #dee2e6;
}

/* Project Priming Page */
.project-priming-page {
    padding: 24px;
    max-width: 1000px;
    margin: 0 auto;
    width: 100%;
    overflow-y: auto;
    flex: 1;
}

.priming-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.priming-header h2 {
    color: #495057;
    font-size: 1.75rem;
    font-weight: 600;
}

.priming-actions {
    display: flex;
    align-items: center;
    gap: 16px;
}

.priming-editor {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.priming-textarea {
    width: 100%;
    border: none;
    padding: 24px;
    font-size: 14px;
    line-height: 1.6;
    resize: none;
    font-family: inherit;
    min-height: 400px;
}

.priming-textarea:focus {
    outline: none;
}

.priming-info {
    display: flex;
    align-items: center;
}

.priming-info small {
    color: #6c757d;
    font-style: italic;
}

.status-text.saving {
    color: #667eea;
}

/* GAIL Chat Page */
.gail-chat-page {
    display: flex;
    flex-direction: column;
    height: 100%;
    width: 100%;
    max-width: 1000px;
    margin: 0 auto;
    overflow: hidden;
}

.chat-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px;
    border-bottom: 1px solid #e9ecef;
    background: white;
}

.chat-title h2 {
    color: #495057;
    font-size: 1.75rem;
    font-weight: 600;
    margin-bottom: 4px;
}

.chat-subtitle {
    color: #6c757d;
    font-size: 14px;
    margin: 0;
}

.chat-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: white;
    overflow: hidden;
    min-height: 0;
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 24px;
    background: #f8f9fa;
}

.message {
    display: flex;
    gap: 12px;
    margin-bottom: 24px;
}

.message-avatar {
    flex-shrink: 0;
}

.user-avatar,
.ai-avatar,
.error-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
}

.user-avatar {
    background: #667eea;
}

.ai-avatar {
    background: #28a745;
}

.error-avatar {
    background: #dc3545;
}

.message-content {
    flex: 1;
    max-width: calc(100% - 60px);
}

.message-bubble {
    padding: 12px 16px;
    border-radius: 12px;
    margin-bottom: 4px;
    word-wrap: break-word;
}

.user-bubble {
    background: #667eea;
    color: white;
    margin-left: auto;
    max-width: 80%;
}

.ai-bubble {
    background: white;
    border: 1px solid #e9ecef;
    max-width: 90%;
}

.error-bubble {
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
}

.message-time {
    font-size: 11px;
    color: #6c757d;
    margin-left: 16px;
}

.welcome-message .message-bubble {
    background: #e3f2fd;
    border: 1px solid #bbdefb;
}

.welcome-message ul {
    margin: 12px 0;
    padding-left: 20px;
}

.welcome-message li {
    margin-bottom: 4px;
}

.chat-input-container {
    border-top: 1px solid #e9ecef;
    background: white;
    flex-shrink: 0;
}

.typing-indicator {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background: #f8f9fa;
    border-bottom: 1px solid #e9ecef;
}

.typing-dots {
    display: flex;
    gap: 4px;
}

.typing-dots span {
    width: 6px;
    height: 6px;
    background: #6c757d;
    border-radius: 50%;
    animation: typingDot 1.4s infinite ease-in-out;
}

.typing-dots span:nth-child(1) { animation-delay: -0.32s; }
.typing-dots span:nth-child(2) { animation-delay: -0.16s; }

@keyframes typingDot {
    0%, 80%, 100% { transform: scale(0.8); opacity: 0.5; }
    40% { transform: scale(1); opacity: 1; }
}

.typing-text {
    font-size: 12px;
    color: #6c757d;
    font-style: italic;
}

.chat-input-wrapper {
    padding: 16px 24px;
}

.chat-input-area {
    display: flex;
    gap: 12px;
    align-items: flex-end;
}

.message-input {
    flex: 1;
    border: 2px solid #e9ecef;
    border-radius: 20px;
    padding: 12px 16px;
    font-size: 14px;
    resize: none;
    max-height: 120px;
    font-family: inherit;
    line-height: 1.4;
}

.message-input:focus {
    outline: none;
    border-color: #667eea;
}

.send-btn {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: #667eea;
    color: white;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.send-btn:hover:not(:disabled) {
    background: #5a6fd8;
    transform: scale(1.05);
}

.send-btn:disabled {
    background: #6c757d;
    cursor: not-allowed;
}

.input-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 8px;
    font-size: 12px;
    color: #6c757d;
}

.input-hints {
    display: flex;
    gap: 16px;
}

.hint kbd {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 3px;
    padding: 2px 4px;
    font-size: 11px;
}

.character-count.warning {
    color: #dc3545;
}

/* Code Frame Page */
.code-frame-page {
    padding: 24px;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
    overflow-y: auto;
    flex: 1;
}

.header-content {
    flex: 1;
}

.header-content h2 {
    color: #495057;
    font-size: 1.75rem;
    font-weight: 600;
    margin-bottom: 4px;
}

.page-subtitle {
    color: #6c757d;
    font-size: 14px;
    margin: 0;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.questions-container {
    margin-top: 24px;
}

.questions-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.question-card {
    background: white;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    border: 1px solid #e9ecef;
}

.question-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.question-number {
    background: #667eea;
    color: white;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.question-actions {
    display: flex;
    gap: 8px;
}

.question-content {
    margin-bottom: 16px;
}

.question-text {
    color: #495057;
    font-size: 16px;
    line-height: 1.5;
}

.question-meta {
    margin-bottom: 20px;
}

.question-dates {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.question-dates small {
    color: #6c757d;
    font-size: 12px;
}

.question-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.question-stats {
    display: flex;
    gap: 16px;
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 6px;
    color: #6c757d;
    font-size: 12px;
}

.stat-item.priming-indicator {
    color: #667eea;
    font-weight: 600;
    background: #e3f2fd;
    padding: 4px 8px;
    border-radius: 12px;
    transition: all 0.3s ease;
}

.stat-item.priming-indicator:hover {
    background: #bbdefb;
    color: #0c5620;
}
.stat-item.priming-indicator-set {
    color: #155724;
    font-weight: 600;
    background: #d4edda;
    padding: 4px 8px;
    border-radius: 12px;
    transition: all 0.3s ease;
}

.stat-item.priming-indicator-set:hover {
    background: #c3e6cb;
    color: #0c5620;
}

/* CSV Upload Page */
.csv-upload-page {
    padding: 24px;
    max-width: 1200px;
    margin: 0 auto;
}

.upload-container {
    margin-top: 24px;
}

.upload-section {
    margin-bottom: 32px;
}

.upload-area {
    border: 2px dashed #dee2e6;
    border-radius: 12px;
    padding: 48px 24px;
    text-align: center;
    background: #f8f9fa;
    transition: all 0.3s ease;
    cursor: pointer;
}

.upload-area:hover,
.upload-area.drag-over {
    border-color: #667eea;
    background: #e3f2fd;
}

.upload-icon {
    font-size: 3rem;
    margin-bottom: 16px;
}

.upload-area h3 {
    color: #495057;
    margin-bottom: 8px;
}

.upload-area p {
    color: #6c757d;
    margin-bottom: 20px;
}

.upload-info {
    margin-top: 16px;
}

.upload-info small {
    color: #6c757d;
}

.file-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: white;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 16px 20px;
    margin-top: 16px;
}

.file-details {
    flex: 1;
}

.file-name {
    font-weight: 500;
    color: #495057;
    margin-bottom: 4px;
}

.file-stats {
    font-size: 12px;
    color: #6c757d;
}

.file-actions {
    display: flex;
    gap: 12px;
}

.data-section {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.data-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 1px solid #e9ecef;
}

.data-title h3 {
    color: #495057;
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 4px;
}

.data-stats {
    font-size: 12px;
    color: #6c757d;
}

.data-actions {
    display: flex;
    gap: 12px;
}

.grid-container {
    padding: 0;
}

.grid-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 24px;
    background: #f8f9fa;
    border-top: 1px solid #e9ecef;
}

.grid-info {
    font-size: 12px;
    color: #6c757d;
}

.grid-controls {
    display: flex;
    gap: 8px;
}

/* Question Data Page */
.question-data-page {
    padding: 24px;
    max-width: 1200px;
    margin: 0 auto;
}

.data-container {
    margin-top: 24px;
}

.data-status {
    margin-bottom: 32px;
}

.status-card {
    background: white;
    border-radius: 12px;
    padding: 32px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    border: 1px solid #e9ecef;
    display: flex;
    align-items: center;
    gap: 24px;
}

.status-card.success {
    border-left: 4px solid #28a745;
}

.status-card.empty {
    border-left: 4px solid #6c757d;
    text-align: center;
    flex-direction: column;
    gap: 16px;
}

.status-icon {
    font-size: 3rem;
    flex-shrink: 0;
}

.status-content h3 {
    color: #495057;
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 8px;
}

.status-content p {
    color: #6c757d;
    margin-bottom: 16px;
    line-height: 1.5;
}

.status-meta small {
    color: #6c757d;
    font-size: 12px;
}

.analysis-section {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    margin-top: 24px;
    overflow: hidden;
}

.analysis-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 1px solid #e9ecef;
    background: #f8f9fa;
}

.analysis-header h3 {
    color: #495057;
    font-size: 1.25rem;
    font-weight: 600;
    margin: 0;
}

.analysis-content {
    padding: 24px;
}

.analysis-overview {
    display: flex;
    gap: 24px;
    margin-bottom: 32px;
}

.stat-card {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 20px;
    text-align: center;
    flex: 1;
    border: 1px solid #e9ecef;
}

.stat-value {
    font-size: 2rem;
    font-weight: 600;
    color: #667eea;
    margin-bottom: 4px;
}

.stat-label {
    color: #6c757d;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.column-analysis h4 {
    color: #495057;
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 20px;
}

.columns-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

.column-card {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 16px;
    border: 1px solid #e9ecef;
}

.column-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.column-header h5 {
    color: #495057;
    font-size: 14px;
    font-weight: 600;
    margin: 0;
    flex: 1;
    word-break: break-word;
}

.column-type {
    background: #667eea;
    color: white;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 10px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.column-stats {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.stat-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
}

.stat-row span:first-child {
    color: #6c757d;
    font-weight: 500;
}

.stat-row span:last-child {
    color: #495057;
    font-weight: 600;
}

.sample-values {
    font-size: 11px;
    color: #495057;
    font-style: italic;
    word-break: break-word;
    max-width: 150px;
    text-align: right;
}

.btn-success {
    background: #28a745;
    color: white;
}

.btn-success:hover:not(:disabled) {
    background: #218838;
}


/* Error States */
.error {
    background: #f8d7da;
    color: #721c24;
    padding: 16px;
    border-radius: 8px;
    border: 1px solid #f5c6cb;
    text-align: center;
    margin: 20px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .project-layout {
        flex-direction: column;
    }
    
    .sidebar {
        width: 100%;
        height: auto;
    }
    
    .projects-grid {
        grid-template-columns: 1fr;
    }
    
    .page-header {
        flex-direction: column;
        gap: 16px;
        align-items: flex-start;
    }

    .header-actions {
        width: 100%;
        flex-direction: column;
    }

    .header-actions .btn {
        width: 100%;
    }

    .brief-header,
    .chat-header,
    .data-header {
        flex-direction: column;
        gap: 16px;
        align-items: flex-start;
    }
    
    .form-actions {
        flex-direction: column;
    }
    
    .input-hints {
        display: none;
    }
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.project-card,
.question-card,
.message {
    animation: fadeIn 0.3s ease;
}

/* Code Frame Generation Progress Modal */
.progress-container {
    margin-bottom: 24px;
}

.progress-info {
    margin-bottom: 20px;
}

.progress-info p {
    color: #495057;
    font-size: 16px;
    font-weight: 500;
    margin-bottom: 8px;
}

.progress-details {
    color: #6c757d;
    font-size: 14px;
}

.progress-bar-container {
    display: flex;
    align-items: center;
    gap: 12px;
}

.progress-bar {
    flex: 1;
    height: 8px;
    background: #e9ecef;
    border-radius: 4px;
    overflow: hidden;
}

.progress-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #667eea, #764ba2);
    border-radius: 4px;
    transition: width 0.3s ease;
    position: relative;
}

.progress-bar-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    animation: progressShimmer 2s infinite;
}

@keyframes progressShimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

.progress-percentage {
    min-width: 40px;
    text-align: right;
    font-size: 14px;
    font-weight: 600;
    color: #495057;
}

.code-frame-result {
    margin-top: 24px;
    padding-top: 24px;
    border-top: 1px solid #e9ecef;
}

.code-frame-result h3 {
    color: #495057;
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 16px;
}

.code-frame-content {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    max-height: 300px;
    overflow-y: auto;
}

.code-frame-content pre {
    margin: 0;
    padding: 16px;
    font-size: 12px;
    line-height: 1.4;
    color: #495057;
    white-space: pre-wrap;
    word-wrap: break-word;
}

/* Enhanced Modal for Code Frame */
.modal-content {
    max-width: 800px;
}

#codeFrameModal .modal-content {
    max-width: 900px;
    width: 95%;
}

#codeFrameModal .modal-body {
    padding: 32px;
}

/* Generate Code-Frame Button Styling */
.generate-code-frame-btn {
    background: #28a745;
    color: white;
    border: none;
    padding: 10px 16px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.generate-code-frame-btn:hover:not(:disabled) {
    background: #218838;
    transform: translateY(-1px);
}

.generate-code-frame-btn:disabled {
    background: #6c757d;
    cursor: not-allowed;
    opacity: 0.6;
}

/* Question Footer Button Layout */
.question-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
}

.question-footer .btn {
    margin-right: 8px;
}

.question-footer .btn:last-of-type {
    margin-right: 0;
}

/* Progress Modal Animation */
@keyframes modalSlideInLarge {
    from {
        opacity: 0;
        transform: translateY(-30px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

#codeFrameModal .modal-content {
    animation: modalSlideInLarge 0.3s ease;
}

/* Status Indicators */
.processing-status {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    background: #e3f2fd;
    border: 1px solid #bbdefb;
    border-radius: 8px;
    margin-bottom: 16px;
}

.processing-status .spinner {
    width: 16px;
    height: 16px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #667eea;
    margin: 0;
}

.success-status {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    background: #d4edda;
    border: 1px solid #c3e6cb;
    border-radius: 8px;
    color: #155724;
    margin-bottom: 16px;
}

.error-status {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    border-radius: 8px;
    color: #721c24;
    margin-bottom: 16px;
}

/* Responsive adjustments for code frame modal */
@media (max-width: 768px) {
    #codeFrameModal .modal-content {
        width: 95%;
        margin: 2% auto;
    }
    
    #codeFrameModal .modal-body {
        padding: 20px;
    }
    
    .progress-bar-container {
        flex-direction: column;
        gap: 8px;
    }
    
    .progress-percentage {
        text-align: center;
    }
    
    .question-footer {
        flex-direction: column;
        align-items: stretch;
    }
    
    .question-footer .btn {
        margin-right: 0;
        margin-bottom: 8px;
    }
    
    .question-footer .btn:last-child {
        margin-bottom: 0;
    }
}

/* Markdown Content Styling */
.markdown-content {
    line-height: 1.6;
    color: #333;
}

.markdown-content h1,
.markdown-content h2,
.markdown-content h3,
.markdown-content h4,
.markdown-content h5,
.markdown-content h6 {
    margin: 1.5em 0 0.5em 0;
    font-weight: 600;
    color: #2c3e50;
    line-height: 1.3;
}

.markdown-content h1 {
    font-size: 1.8em;
    border-bottom: 2px solid #e9ecef;
    padding-bottom: 0.3em;
}

.markdown-content h2 {
    font-size: 1.5em;
    border-bottom: 1px solid #e9ecef;
    padding-bottom: 0.3em;
}

.markdown-content h3 {
    font-size: 1.3em;
}

.markdown-content h4 {
    font-size: 1.1em;
}

.markdown-content h5,
.markdown-content h6 {
    font-size: 1em;
}

.markdown-content p {
    margin: 0.8em 0;
    line-height: 1.6;
}

.markdown-content ul,
.markdown-content ol {
    margin: 1em 0;
    padding-left: 2em;
}

.markdown-content li {
    margin: 0.3em 0;
    line-height: 1.5;
}

.markdown-content ul li {
    list-style-type: disc;
}

.markdown-content ol li {
    list-style-type: decimal;
}

.markdown-content ul ul,
.markdown-content ol ol,
.markdown-content ul ol,
.markdown-content ol ul {
    margin: 0.3em 0;
}

.markdown-content blockquote {
    margin: 1em 0;
    padding: 0.5em 1em;
    border-left: 4px solid #667eea;
    background: #f8f9fa;
    color: #555;
    font-style: italic;
}

.markdown-content code {
    background: #f1f3f4;
    padding: 0.2em 0.4em;
    border-radius: 3px;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 0.9em;
    color: #d73a49;
}

.markdown-content pre {
    background: #f6f8fa;
    border: 1px solid #e1e4e8;
    border-radius: 6px;
    padding: 1em;
    overflow-x: auto;
    margin: 1em 0;
    line-height: 1.45;
}

.markdown-content pre code {
    background: none;
    padding: 0;
    border-radius: 0;
    color: #24292e;
    font-size: 0.85em;
}

.markdown-content table {
    border-collapse: collapse;
    width: 100%;
    margin: 1em 0;
    border: 1px solid #e1e4e8;
}

.markdown-content th,
.markdown-content td {
    border: 1px solid #e1e4e8;
    padding: 0.6em 1em;
    text-align: left;
}

.markdown-content th {
    background: #f6f8fa;
    font-weight: 600;
    color: #24292e;
}

.markdown-content tr:nth-child(even) {
    background: #f6f8fa;
}

.markdown-content a {
    color: #0366d6;
    text-decoration: none;
}

.markdown-content a:hover {
    text-decoration: underline;
}

.markdown-content strong {
    font-weight: 600;
    color: #24292e;
}

.markdown-content em {
    font-style: italic;
    color: #586069;
}

.markdown-content hr {
    border: none;
    border-top: 1px solid #e1e4e8;
    margin: 2em 0;
}

.markdown-content img {
    max-width: 100%;
    height: auto;
    border-radius: 4px;
    margin: 0.5em 0;
}

/* Code frame specific styling */
.code-frame-content .markdown-content {
    font-size: 14px;
}

.code-frame-content .markdown-content h1 {
    font-size: 1.4em;
    margin-top: 0;
}

.code-frame-content .markdown-content h2 {
    font-size: 1.2em;
}

.code-frame-content .markdown-content h3 {
    font-size: 1.1em;
}

.code-frame-content .markdown-content p {
    margin: 0.6em 0;
}

.code-frame-content .markdown-content ul,
.code-frame-content .markdown-content ol {
    margin: 0.8em 0;
}

.code-frame-content .markdown-content li {
    margin: 0.2em 0;
}

/* View modal specific styling */
#viewCodeFrameContent .markdown-content {
    font-size: 15px;
}

#viewCodeFrameContent .markdown-content h1 {
    margin-top: 0;
}

/* Scrollbar Styling */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* Authentication Styles */
.auth-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.auth-box {
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    width: 100%;
    max-width: 450px;
    overflow: hidden;
}

.auth-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 30px 20px;
    text-align: center;
}

.auth-title {
    color: white;
    font-size: 1.75rem;
    font-weight: 600;
    margin: 0;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.auth-form {
    padding: 30px;
}

.auth-form h3 {
    color: #333;
    font-size: 1.5rem;
    margin-bottom: 24px;
    text-align: center;
}

.auth-form p {
    color: #666;
    margin-bottom: 20px;
    text-align: center;
    font-size: 14px;
}

.auth-form .form-group {
    margin-bottom: 20px;
}

.auth-form label {
    display: block;
    color: #555;
    font-weight: 500;
    margin-bottom: 8px;
    font-size: 14px;
}

.auth-form .form-control {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.3s ease;
    font-family: inherit;
}

.auth-form .form-control:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.auth-form small {
    display: block;
    color: #999;
    font-size: 12px;
    margin-top: 4px;
}

.error-message {
    background: #fee;
    color: #c33;
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 16px;
    font-size: 14px;
    border: 1px solid #fcc;
}

.error-message:empty {
    display: none;
}

.success-message {
    background: #efe;
    color: #3c3;
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 16px;
    font-size: 14px;
    border: 1px solid #cfc;
}

.auth-form .btn-primary {
    width: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 14px 20px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 8px;
}

.auth-form .btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.auth-form .btn-primary:active {
    transform: translateY(0);
}

.auth-form .btn-primary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.auth-links {
    margin-top: 20px;
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.auth-links a {
    color: #667eea;
    text-decoration: none;
    font-size: 14px;
    transition: color 0.3s ease;
}

.auth-links a:hover {
    color: #764ba2;
    text-decoration: underline;
}

/* User Menu Dropdown */
.app-nav-container {
    display: flex;
    align-items: center;
    gap: 12px;
}

.user-menu-container {
    position: relative;
}

.btn-user-menu {
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    padding: 10px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
}

.btn-user-menu:hover {
    background: rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.4);
}

.btn-user-menu i:last-child {
    font-size: 12px;
    transition: transform 0.3s ease;
}

.dropdown-menu {
    position: fixed;
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
    min-width: 220px;
    z-index: 1000;
    overflow: hidden;
    pointer-events: auto;
}

.dropdown-section {
    padding: 0;
}

.dropdown-label {
    padding: 12px 16px 8px;
    font-size: 12px;
    font-weight: 600;
    color: #999;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    color: #333;
    text-decoration: none;
    transition: all 0.2s ease;
    cursor: pointer;
}

.dropdown-item:hover {
    background: #f5f5f5;
    color: #667eea;
}

.dropdown-item i {
    font-size: 14px;
    width: 18px;
    text-align: center;
}

.user-role-display {
    background: #f9f9f9;
    cursor: default;
    padding: 10px 16px;
}

.user-role-display:hover {
    background: #f9f9f9;
    color: #333;
}

.user-role-display strong {
    color: #667eea;
    margin-left: 4px;
}

.logout-item {
    color: #d32f2f;
}

.logout-item:hover {
    background: #ffebee;
    color: #b71c1c;
}

.dropdown-separator {
    height: 1px;
    background: #e0e0e0;
    margin: 0;
}

/* Admin Grid Styles */
.admin-users-container,
.admin-projects-container {
    padding: 24px;
    max-width: 1400px;
    margin: 0 auto;
}

.admin-users-container h2,
.admin-projects-container h2 {
    color: #495057;
    font-size: 1.75rem;
    font-weight: 600;
    margin-bottom: 24px;
}

.grid-toolbar {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
    align-items: center;
}

.grid-toolbar .btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.ag-theme-alpine {
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.ag-theme-alpine .ag-root {
    font-family: inherit;
    font-size: 14px;
}

.ag-theme-alpine .ag-header {
    background: #f8f9fa;
    border-bottom: 2px solid #e9ecef;
}

.ag-theme-alpine .ag-header-cell {
    color: #495057;
    font-weight: 600;
}

.ag-theme-alpine .ag-cell {
    color: #333;
    padding: 12px 16px;
    display: flex;
    align-items: center;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ag-theme-alpine .ag-cell[role="gridcell"] {
    display: flex;
    align-items: center;
}

.ag-theme-alpine .ag-row {
    border-bottom: 1px solid #e9ecef;
    height: 50px;
}

.ag-theme-alpine .ag-row:hover {
    background-color: #f8f9fa;
}

.ag-theme-alpine .ag-cell-focus {
    outline: none;
}

/* Cell value alignment */
.ag-theme-alpine .ag-cell-value {
    display: flex;
    align-items: center;
    height: 100%;
}

/* Editable cell styling */
.ag-theme-alpine .ag-cell-inline-editing {
    padding: 0;
    display: flex;
    align-items: center;
}

.ag-theme-alpine .ag-text-field-input,
.ag-theme-alpine .ag-large-text-field-input {
    padding: 12px 16px;
    border: 2px solid #667eea;
    border-radius: 4px;
    width: 100%;
    box-sizing: border-box;
}

/* Allow text wrapping for description column */
.ag-theme-alpine .ag-cell[col-id="description"] {
    white-space: normal;
    overflow: visible;
    text-overflow: clip;
    height: auto;
    line-height: 1.5;
}

/* Select cell editor */
.ag-theme-alpine .ag-cell-edit-wrapper {
    padding: 0;
}

.ag-theme-alpine .ag-select-editor {
    padding: 8px 16px;
    border: 2px solid #667eea;
}

/* Pagination */
.ag-theme-alpine .ag-paging-panel {
    background: #f8f9fa;
    border-top: 1px solid #e9ecef;
    padding: 12px 20px;
}

.ag-theme-alpine .ag-paging-button {
    color: #667eea;
}

.ag-theme-alpine .ag-paging-button:disabled {
    color: #ccc;
}

/* Action buttons in grid */
.btn-small {
    padding: 6px 12px;
    font-size: 12px;
    min-width: 80px;
}

.btn-view {
    background: #667eea;
    color: white;
}

.btn-view:hover {
    background: #5a6fd8;
}

.btn-delete {
    background: #dc3545;
    color: white;
}

.btn-delete:hover {
    background: #c82333;
}

/* Members Modal Styles */
.members-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.members-modal {
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1), 0 10px 20px rgba(0, 0, 0, 0.15);
    width: 90%;
    max-width: 600px;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
    animation: slideIn 0.3s ease;
}

.members-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 1px solid #e9ecef;
}

.members-modal-header h3 {
    margin: 0;
    color: #495057;
    font-size: 1.3rem;
    font-weight: 600;
}

.members-modal-content {
    padding: 24px;
    overflow-y: auto;
    flex: 1;
}

.members-section {
    margin-bottom: 24px;
}

.members-section:last-child {
    margin-bottom: 0;
}

.members-section h4 {
    margin: 0 0 12px 0;
    color: #495057;
    font-size: 0.95rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.member-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: #f8f9fa;
    border-radius: 6px;
    margin-bottom: 8px;
    justify-content: space-between;
}

.member-item:last-child {
    margin-bottom: 0;
}

.member-info {
    flex: 1;
    min-width: 0;
}

.member-info strong {
    display: block;
    color: #495057;
    font-weight: 600;
    margin-bottom: 4px;
}

.member-info small {
    display: block;
    color: #6c757d;
    font-size: 0.85rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.member-role {
    padding: 4px 8px;
    background: #e3f2fd;
    color: #1976d2;
    border-radius: 4px;
    font-size: 0.85rem;
    font-weight: 600;
    white-space: nowrap;
}

.empty-state {
    color: #6c757d;
    text-align: center;
    padding: 20px;
    font-style: italic;
    margin: 0;
}

/* Share Modal Styles */
.share-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.share-modal {
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1), 0 10px 20px rgba(0, 0, 0, 0.15);
    width: 90%;
    max-width: 600px;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
    animation: slideIn 0.3s ease;
}

.share-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 1px solid #e9ecef;
}

.share-modal-header h3 {
    margin: 0;
    color: #495057;
    font-size: 1.3rem;
    font-weight: 600;
}

.share-modal-content {
    padding: 24px;
    overflow-y: auto;
    flex: 1;
}

.share-section {
    margin-bottom: 24px;
}

.share-section:last-child {
    margin-bottom: 0;
}

.share-section h4 {
    margin: 0 0 12px 0;
    color: #495057;
    font-size: 0.95rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Autocomplete Styles */
.autocomplete-wrapper {
    position: relative;
}

.autocomplete-suggestions {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #e9ecef;
    border-top: none;
    border-radius: 0 0 6px 6px;
    max-height: 200px;
    overflow-y: auto;
    list-style: none;
    margin: 0;
    padding: 0;
    z-index: 1001;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.suggestion-item {
    padding: 12px 16px;
    cursor: pointer;
    transition: background-color 0.2s ease;
    border-bottom: 1px solid #f0f0f0;
}

.suggestion-item:last-child {
    border-bottom: none;
}

.suggestion-item:hover {
    background-color: #f8f9fa;
}

.suggestion-item strong {
    display: block;
    color: #495057;
    font-weight: 600;
    margin-bottom: 4px;
}

.suggestion-item small {
    display: block;
    color: #6c757d;
    font-size: 0.85rem;
}

.no-results {
    padding: 12px 16px;
    color: #6c757d;
    text-align: center;
    font-style: italic;
    cursor: default;
}

.no-results:hover {
    background-color: transparent;
}

/* Priming Preview Box in Modal */
.priming-preview-box {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 6px;
    padding: 12px 16px;
    min-height: 60px;
    display: flex;
    align-items: center;
    margin-bottom: 12px;
}

.priming-preview-content {
    width: 100%;
}

.priming-preview-text {
    color: #6c757d;
    font-size: 13px;
    line-height: 1.4;
    word-break: break-word;
    display: block;
}

/* Question Priming Editor Page */
.question-priming-editor-page {
    padding: 24px;
}

.question-context {
    background: #f8f9fa;
    border-radius: 8px;
    margin-bottom: 32px;
    padding: 20px;
    border-left: 4px solid #667eea;
}

.context-box {
    margin: 0;
}

.context-box h3 {
    color: #495057;
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.question-text-display {
    color: #333;
    font-size: 15px;
    line-height: 1.6;
    margin: 0;
    word-break: break-word;
}

.editor-label {
    margin-bottom: 16px;
}

.editor-label label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: #495057;
    margin-bottom: 6px;
}

.editor-help {
    display: block;
    font-size: 12px;
    color: #6c757d;
    font-weight: 400;
    margin-bottom: 4px;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 13px;
    height: auto;
}
