* { 
    margin: 0; 
    padding: 0; 
    box-sizing: border-box; 
}

body { 
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif; 
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); 
    min-height: 100vh; 
    padding: 20px; 
}

.container { 
    max-width: 1400px; 
    margin: 0 auto; 
    background: white; 
    border-radius: 12px; 
    box-shadow: 0 20px 40px rgba(0,0,0,0.1); 
    overflow: hidden; 
}

.header { 
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%); 
    color: white; 
    padding: 30px; 
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 100%;
}

.header-text {
    text-align: center;
    flex: 1;
}

.header h1 { 
    font-size: 2.5em; 
    margin-bottom: 10px; 
    font-weight: 300; 
}

.header p { 
    opacity: 0.9; 
    font-size: 1.1em; 
}

.dropdown-menu {
    position: relative;
    display: inline-block;
}

.dropdown-toggle {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 0.9em;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.dropdown-toggle:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.3);
}

.dropdown-content {
    display: none;
    position: absolute;
    right: 0;
    top: 100%;
    margin-top: 8px;
    background: white;
    min-width: 200px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    border-radius: 8px;
    overflow: hidden;
    z-index: 1000;
}

.dropdown-content.show {
    display: block;
}

.dropdown-content a {
    color: #2c3e50;
    padding: 12px 16px;
    text-decoration: none;
    display: block;
    transition: background-color 0.2s ease;
    font-size: 0.9em;
}

.dropdown-content a:hover {
    background-color: #f8f9fa;
}

.main-content { 
    padding: 30px; 
}

.upload-section { 
    background: #f8f9fa; 
    border-radius: 8px; 
    padding: 30px; 
    margin-bottom: 30px; 
    border: 2px dashed #dee2e6; 
    text-align: center; 
    transition: all 0.3s ease; 
}

.upload-section:hover { 
    border-color: #667eea; 
    background: #f0f4ff; 
}

.upload-section.dragover { 
    border-color: #667eea; 
    background: #e3f2fd; 
    transform: scale(1.02); 
}

.file-input-wrapper { 
    position: relative; 
    display: inline-block; 
    margin: 20px 0; 
}

.file-input { 
    position: absolute; 
    opacity: 0; 
    width: 100%; 
    height: 100%; 
    cursor: pointer; 
}

.file-input-button { 
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); 
    color: white; 
    padding: 15px 30px; 
    border-radius: 25px; 
    border: none; 
    font-size: 1.1em; 
    cursor: pointer; 
    transition: all 0.3s ease; 
    display: inline-block; 
}

.file-input-button:hover { 
    transform: translateY(-2px); 
    box-shadow: 0 10px 20px rgba(102, 126, 234, 0.3); 
}

/* Upload model selection styles removed - now handled in group processing modal */

.groups-header { 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    margin-bottom: 20px; 
}

.groups-title { 
    font-size: 1.8em; 
    color: #2c3e50; 
    font-weight: 600; 
}

.btn { 
    padding: 10px 20px; 
    border: none; 
    border-radius: 6px; 
    cursor: pointer; 
    font-size: 14px; 
    font-weight: 500; 
    transition: all 0.3s ease; 
    text-decoration: none; 
    display: inline-flex; 
    align-items: center; 
    gap: 8px; 
}

.btn-primary { 
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); 
    color: white; 
}

.btn-primary:hover { 
    transform: translateY(-1px); 
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.3); 
}

.btn-secondary { 
    background: #6c757d; 
    color: white; 
}

.btn-danger { 
    background: #dc3545; 
    color: white; 
}

.btn-success { 
    background: #28a745; 
    color: white; 
}

.btn-warning {
    background: #ffc107;
    color: #212529;
}

.btn-info {
    background: #17a2b8;
    color: white;
}

.btn-sm { 
    padding: 6px 12px; 
    font-size: 12px; 
}

.group-card { 
    background: white; 
    border: 1px solid #dee2e6; 
    border-radius: 12px; 
    margin-bottom: 20px; 
    box-shadow: 0 2px 8px rgba(0,0,0,0.1); 
}

.group-header { 
    background: #f8f9fa; 
    padding: 20px; 
    border-bottom: 1px solid #dee2e6; 
    cursor: pointer; 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
}

.group-header:hover { 
    background: #e9ecef; 
}

.group-info { 
    display: flex; 
    align-items: center; 
    gap: 15px; 
}

.group-toggle { 
    font-size: 1.2em; 
    color: #6c757d; 
    transition: transform 0.3s ease; 
}

.group-toggle.expanded { 
    transform: rotate(90deg); 
}

.group-name { 
    font-size: 1.3em; 
    font-weight: 600; 
    color: #2c3e50; 
    margin: 0; 
}

.group-stats { 
    display: flex; 
    gap: 20px; 
    font-size: 0.9em; 
    color: #6c757d; 
}

.stat-item { 
    display: flex; 
    flex-direction: column; 
    align-items: center; 
}

.stat-value { 
    font-weight: 600; 
    color: #2c3e50; 
    font-size: 1.1em; 
}

.stat-label { 
    font-size: 0.8em; 
    margin-top: 2px; 
}

.group-actions { 
    display: flex; 
    gap: 8px; 
}

.group-content { 
    display: none; 
    padding: 20px; 
}

.group-content.expanded { 
    display: block; 
}

.file-list { 
    display: flex; 
    flex-direction: column; 
    gap: 10px; 
}

.file-item { 
    display: flex; 
    align-items: center; 
    padding: 15px; 
    border: 1px solid #f1f3f4; 
    border-radius: 8px; 
    background: #fafafa; 
}

.file-item:hover { 
    background: #f0f0f0; 
}

.file-checkbox { 
    margin-right: 15px; 
}

.file-info { 
    flex: 1; 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
}

.file-name { 
    font-weight: 600; 
    color: #2c3e50; 
}

.file-meta { 
    font-size: 0.8em; 
    color: #6c757d; 
    margin-top: 4px; 
}

.validation-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.85em;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-left: 8px;
}

.validation-badge:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.validation-error {
    background-color: #fee;
    color: #c33;
    border: 1px solid #fcc;
}

.validation-error:hover {
    background-color: #fdd;
}

.validation-warning {
    background-color: #fff3cd;
    color: #856404;
    border: 1px solid #ffeaa7;
}

.validation-warning:hover {
    background-color: #ffe8a1;
}

.file-progress {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 8px;
    max-width: 400px;
}

.progress-bar {
    flex: 1 1 250px;
    height: 8px;
    background: #e0e0e0;
    border-radius: 4px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
    transition: width 0.3s ease;
    border-radius: 4px;
}

.progress-text {
    font-size: 0.75em;
    font-weight: 600;
    color: #667eea;
    min-width: 180px;
    text-align: right;
    white-space: nowrap;
}

.file-status { 
    padding: 4px 12px; 
    border-radius: 20px; 
    font-size: 0.75em; 
    font-weight: 600; 
    text-transform: uppercase; 
    text-transform: uppercase; 
}

.status-uploaded { 
    background: #e3f2fd; 
    color: #1976d2; 
}

.status-queued { 
    background: #fff3e0; 
    color: #f57c00; 
}

.status-processing { 
    background: #f3e5f5; 
    color: #7b1fa2; 
}

.status-completed { 
    background: #e8f5e8; 
    color: #388e3c; 
}

.status-failed { 
    background: #ffebee; 
    color: #d32f2f; 
}

.file-actions { 
    display: flex; 
    gap: 8px; 
}

.modal { 
    display: none; 
    position: fixed; 
    z-index: 2000; 
    left: 0; 
    top: 0; 
    width: 100%; 
    height: 100%; 
    background: rgba(0,0,0,0.5); 
}

.modal-content { 
    background: white; 
    margin: 10% auto; 
    padding: 0; 
    border-radius: 12px; 
    width: 90%; 
    max-width: 500px; 
    box-shadow: 0 20px 40px rgba(0,0,0,0.3); 
}

.modal-header { 
    padding: 20px 30px; 
    border-bottom: 1px solid #dee2e6; 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
}

.modal-title { 
    font-size: 1.3em; 
    font-weight: 600; 
    color: #2c3e50; 
    margin: 0; 
}

.modal-close { 
    background: none; 
    border: none; 
    font-size: 1.5em; 
    cursor: pointer; 
    color: #6c757d; 
}

.modal-body { 
    padding: 30px; 
}

.modal-footer { 
    padding: 20px 30px; 
    border-top: 1px solid #dee2e6; 
    display: flex; 
    justify-content: flex-end; 
    gap: 10px; 
    background: #f8f9fa; 
}

.form-group { 
    margin-bottom: 20px; 
}

.form-label { 
    display: block; 
    margin-bottom: 8px; 
    font-weight: 600; 
    color: #2c3e50; 
}

.form-control { 
    width: 100%; 
    padding: 12px 15px; 
    border: 1px solid #dee2e6; 
    border-radius: 6px; 
    font-size: 14px; 
}

.notification { 
    position: fixed; 
    top: 20px; 
    right: 20px; 
    max-width: calc(100vw - 40px);
    padding: 15px 20px; 
    border-radius: 8px; 
    color: white; 
    font-weight: 500; 
    z-index: 3000; 
    transform: translateX(calc(100% + 40px)); 
    transition: transform 0.3s ease;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.notification.show { 
    transform: translateX(0); 
}

.notification.success { 
    background: #28a745; 
}

.notification.error { 
    background: #dc3545; 
}

.notification.info { 
    background: #17a2b8; 
}

.notification.warning {
    background: #ffc107;
    color: #212529;
}

.empty-state { 
    text-align: center; 
    padding: 60px 20px; 
    color: #6c757d; 
}

/* File input wrapper */
.file-input-wrapper {
    margin-bottom: 20px;
}

/* Custom prompt styles removed - now handled in group processing modal */

.help-text {
    display: block;
    margin-top: 5px;
    font-size: 12px;
    color: #6c757d;
}

/* Scrollable file lists */
.group-files {
    max-height: 400px;
    overflow-y: auto;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    margin-top: 10px;
}

.group-files::-webkit-scrollbar {
    width: 8px;
}

.group-files::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.group-files::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 4px;
}

.group-files::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* Group Processing Configuration Modal */
.processing-config {
    margin-bottom: 20px;
}

.config-group {
    margin-bottom: 15px;
}

.config-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
    color: #495057;
}

.config-group select,
.config-group textarea {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #ced4da;
    border-radius: 4px;
    font-size: 14px;
}

.config-group select:focus,
.config-group textarea:focus {
    outline: none;
    border-color: #80bdff;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

.group-info {
    padding: 15px;
    background: #f8f9fa;
    border-radius: 6px;
    border-left: 4px solid #007bff;
}

.group-info h4 {
    margin: 0 0 8px 0;
    color: #495057;
}

.group-info p {
    margin: 0;
    color: #6c757d;
}

@media (max-width: 768px) {
    .main-content { 
        padding: 15px; 
    }
    
    .groups-header { 
        flex-direction: column; 
        gap: 15px; 
        align-items: stretch; 
    }
    
    .group-header { 
        flex-direction: column; 
        gap: 15px; 
        align-items: stretch; 
    }
    
    .group-stats { 
        justify-content: space-around; 
    }
    
    .file-info { 
        flex-direction: column; 
        align-items: flex-start; 
        gap: 10px; 
    }
}