/* 🔄 Redirect Analyzer Tool Styles */

.redirect-analyzer {
    max-width: 1400px;
    margin: 0 auto;
}

/* Analyzer header removed - using page header instead */

/* Upload Section */
.upload-section {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 0.75rem;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
}

/* Date Range Section */
.date-range-section {
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 0.5rem;
}

.date-range-section h5 {
    color: #1f2937;
    margin-bottom: 0.5rem;
    font-size: 1.125rem;
    font-weight: 600;
}

.help-text {
    color: #6b7280;
    margin-bottom: 1rem;
    font-size: 0.875rem;
}

.date-inputs {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    align-items: end;
}

.date-input-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.date-input-group label {
    font-weight: 500;
    color: #374151;
    font-size: 0.875rem;
}

.form-control {
    padding: 0.5rem 0.75rem;
    border: 1px solid #d1d5db;
    border-radius: 0.375rem;
    font-size: 0.875rem;
    transition: border-color 0.15s ease-in-out;
}

.form-control:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.upload-section h4 {
    color: #1f2937;
    margin-bottom: 1.5rem;
    font-size: 1.25rem;
}

.file-uploads {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 2rem;
}

.file-upload-group {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.file-label {
    font-weight: 600;
    color: #374151;
    font-size: 1rem;
}

.drop-zone {
    border: 2px dashed #3b82f6;
    border-radius: 0.75rem;
    padding: 2rem;
    text-align: center;
    background-color: #f8fafc;
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
}

.drop-zone:hover,
.drop-zone.drag-over {
    border-color: #2563eb;
    background-color: #eff6ff;
    transform: translateY(-2px);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.drop-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.drop-content i {
    color: #6b7280;
}

.drop-content p {
    margin: 0;
    color: #4b5563;
    font-weight: 500;
}

.drop-hint {
    font-size: 0.875rem !important;
    color: #6b7280 !important;
    font-weight: 400 !important;
}

.file-status {
    margin-top: 1rem;
}

.file-status-message {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    font-weight: 500;
}

.file-status-message.success {
    background-color: #dcfce7;
    color: #166534;
    border: 1px solid #bbf7d0;
}

.file-status-message.error {
    background-color: #fef2f2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

/* Pre-analysis Section */
.pre-analysis-section {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 0.75rem;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
}

.pre-analysis-section h4 {
    color: #1f2937;
    margin-bottom: 1.5rem;
    font-size: 1.25rem;
}

.pre-analysis-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.pre-analysis-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.5rem;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 0.75rem;
    transition: all 0.2s ease;
}

.pre-analysis-card:hover {
    background: #f1f5f9;
    border-color: #cbd5e1;
    transform: translateY(-1px);
}

.pre-analysis-card .card-icon {
    font-size: 2rem;
    line-height: 1;
}

.pre-analysis-card .card-content h5 {
    color: #374151;
    margin: 0 0 0.25rem 0;
    font-size: 0.875rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.025em;
}

.pre-analysis-card .metric {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1f2937;
    margin: 0;
}

.pre-analysis-card .metric.text-warning {
    color: #d97706;
}

.categories-detected {
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: #f9fafb;
    border-radius: 0.5rem;
}

.categories-detected h5 {
    color: #374151;
    margin: 0 0 1rem 0;
    font-size: 1rem;
    font-weight: 600;
}

.category-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.category-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.5rem 0.75rem;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: #374151;
}

.category-badge.category-commercial {
    background: #dbeafe;
    color: #1e40af;
    border-color: #bfdbfe;
}

.category-badge.category-educational {
    background: #dcfce7;
    color: #166534;
    border-color: #bbf7d0;
}

.category-badge.category-tools {
    background: #fef3c7;
    color: #92400e;
    border-color: #fde68a;
}

.category-badge.category-institutional {
    background: #e0e7ff;
    color: #3730a3;
    border-color: #c7d2fe;
}

.category-badge.category-support {
    background: #fed7d7;
    color: #c53030;
    border-color: #feb2b2;
}

.data-quality {
    padding: 1.5rem;
    background: #f9fafb;
    border-radius: 0.5rem;
}

.data-quality h5 {
    color: #374151;
    margin: 0 0 1rem 0;
    font-size: 1rem;
    font-weight: 600;
}

.quality-indicators {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.quality-indicator {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
    border-radius: 0.375rem;
    font-size: 0.875rem;
    font-weight: 500;
}

.quality-indicator.success {
    background: #dcfce7;
    color: #166534;
    border: 1px solid #bbf7d0;
}

.quality-indicator.warning {
    background: #fef3c7;
    color: #92400e;
    border: 1px solid #fde68a;
}

/* Filters Section */
.filters-section {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 0.75rem;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
}

.filters-section h4 {
    color: #1f2937;
    margin-bottom: 0.5rem;
    font-size: 1.25rem;
}

.filters-section p {
    color: #6b7280;
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
}

.filter-checkboxes {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.filter-checkbox {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    cursor: pointer;
    padding: 0.75rem;
    border: 1px solid #e5e7eb;
    border-radius: 0.5rem;
    transition: all 0.2s ease;
}

.filter-checkbox:hover {
    background-color: #f9fafb;
    border-color: #3b82f6;
}

.filter-checkbox input {
    width: auto;
    margin: 0;
}

.filter-checkbox .filter-label {
    font-weight: 500;
    color: #374151;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.25rem;
}

.filter-checkbox .filter-label small {
    color: #6b7280;
    font-weight: 400;
    font-size: 0.75rem;
}

/* Results Section */
.results-section {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 0.75rem;
    margin-bottom: 2rem;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.results-tabs {
    display: flex;
    border-bottom: 1px solid #e5e7eb;
    background-color: #f9fafb;
}

.tab-button {
    flex: 1;
    padding: 1rem 1.5rem;
    background: none;
    border: none;
    cursor: pointer;
    font-weight: 500;
    color: #6b7280;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    position: relative;
}

.tab-button:hover {
    background-color: #f3f4f6;
    color: #374151;
}

.tab-button.active {
    background-color: #ffffff;
    color: #3b82f6;
    border-bottom: 2px solid #3b82f6;
}

.tab-count {
    background-color: #e5e7eb;
    color: #4b5563;
    padding: 0.125rem 0.5rem;
    border-radius: 0.75rem;
    font-size: 0.75rem;
    font-weight: 600;
}

.tab-button.active .tab-count {
    background-color: #dbeafe;
    color: #1e40af;
}

.tab-content {
    min-height: 400px;
}

.tab-panel {
    display: none;
    padding: 2rem;
}

.tab-panel.active {
    display: block;
}

.panel-header {
    margin-bottom: 2rem;
}

.panel-header h4 {
    color: #1f2937;
    margin-bottom: 0.5rem;
    font-size: 1.25rem;
}

.panel-header p {
    color: #6b7280;
    margin-bottom: 1.5rem;
}

.panel-actions {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

/* Table Styles */
.table-container {
    border: 1px solid #e5e7eb;
    border-radius: 0.5rem;
    overflow: auto;
    background-color: #ffffff;
    max-height: 1200px;
}

.results-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.875rem;
}

.results-table th {
    background-color: #f9fafb;
    padding: 0.75rem 1rem;
    text-align: left;
    font-weight: 600;
    color: #374151;
    border-bottom: 1px solid #e5e7eb;
    cursor: pointer;
    user-select: none;
    position: sticky;
    top: 0;
    z-index: 10;
    transition: background-color 0.2s ease;
}

.results-table th:hover {
    background-color: #f3f4f6;
}

.results-table td {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid #f3f4f6;
    color: #4b5563;
}

.results-table tbody tr:hover {
    background-color: #f9fafb;
}

.results-table a {
    color: #3b82f6;
    text-decoration: none;
    font-weight: 500;
    word-break: break-all;
}

.results-table a:hover {
    color: #2563eb;
    text-decoration: underline;
}

.sort-indicator {
    opacity: 0.5;
    margin-left: 0.5rem;
}

.sort-indicator.asc::after {
    content: '↑';
    color: #3b82f6;
    opacity: 1;
}

.sort-indicator.desc::after {
    content: '↓';
    color: #3b82f6;
    opacity: 1;
}

/* Page Type Badges */
.page-type-badge {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    border-radius: 0.375rem;
    font-size: 0.75rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.025em;
}

.page-type-badge.commercial {
    background-color: #dbeafe;
    color: #1e40af;
}

.page-type-badge.educational {
    background-color: #dcfce7;
    color: #166534;
}

.page-type-badge.tools {
    background-color: #fef3c7;
    color: #92400e;
}

.page-type-badge.institutional {
    background-color: #e0e7ff;
    color: #3730a3;
}

.page-type-badge.support {
    background-color: #fed7d7;
    color: #c53030;
}

.page-type-badge.other {
    background-color: #f3f4f6;
    color: #6b7280;
}

/* Legacy badge support for old categories */
.page-type-badge.product {
    background-color: #dbeafe;
    color: #1e40af;
}

.page-type-badge.blog {
    background-color: #dcfce7;
    color: #166534;
}

.page-type-badge.calculator {
    background-color: #fef3c7;
    color: #92400e;
}

.page-type-badge.info {
    background-color: #e0e7ff;
    color: #3730a3;
}

/* Pre-analysis Button Section */
.pre-analysis-button-section {
    margin: 2rem 0;
    text-align: center;
}

.btn-large {
    padding: 1rem 2rem;
    font-size: 1.125rem;
}

/* Categorization Section */
.categorization-section {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 0.75rem;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
}

.categorization-controls {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
    padding: 1rem;
    background: #f9fafb;
    border-radius: 0.5rem;
    flex-wrap: wrap;
}

.category-select {
    padding: 0.375rem 0.75rem;
    border: 1px solid #d1d5db;
    border-radius: 0.375rem;
    font-size: 0.875rem;
    background: #ffffff;
}

.categorization-table-container {
    overflow-x: auto;
    border: 1px solid #e5e7eb;
    border-radius: 0.5rem;
    margin-bottom: 1rem;
    max-height: 500px;
    overflow-y: auto;
}

.categorization-table {
    width: 100%;
    border-collapse: collapse;
}

.categorization-table th {
    background: #f9fafb;
    padding: 0.75rem;
    text-align: left;
    font-weight: 600;
    color: #374151;
    border-bottom: 1px solid #e5e7eb;
    position: sticky;
    top: 0;
    z-index: 10;
}

.categorization-table td {
    padding: 0.5rem 0.75rem;
    border-bottom: 1px solid #f3f4f6;
}

.categorization-table tbody tr:hover {
    background: #f9fafb;
}

.url-cell {
    font-size: 0.875rem;
    color: #374151;
    word-break: break-all;
    max-width: 400px;
}

.categorization-actions {
    text-align: center;
    margin-top: 1.5rem;
}

.btn-sm {
    padding: 0.375rem 0.75rem;
    font-size: 0.875rem;
}

/* Save Section */
.save-section {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 0.75rem;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
}

.save-card {
    text-align: center;
    padding: 2rem;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    border-radius: 0.75rem;
}

.save-card h4 {
    color: white;
    margin-bottom: 0.5rem;
    font-size: 1.25rem;
}

.save-card p {
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 1.5rem;
}

/* Tool Error State */
.tool-error {
    text-align: center;
    padding: 4rem 2rem;
    color: #6b7280;
}

.tool-error h3 {
    color: #f59e0b;
    margin-bottom: 1rem;
    font-size: 1.5rem;
}

.tool-error p {
    margin-bottom: 2rem;
    font-size: 1.1rem;
}

/* Coming Soon State */
.coming-soon {
    text-align: center;
    padding: 4rem 2rem;
    color: #6b7280;
}

.coming-soon-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
}

.coming-soon h3 {
    color: #374151;
    margin-bottom: 1rem;
    font-size: 1.5rem;
}

.coming-soon p {
    margin-bottom: 2rem;
    font-size: 1.1rem;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .file-uploads {
        grid-template-columns: 1fr;
    }
    
    .filter-checkboxes {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .panel-actions {
        justify-content: center;
    }
}

@media (max-width: 768px) {
    .redirect-analyzer {
        margin: 0 -1rem;
    }
    
    .upload-section,
    .filters-section,
    .results-section,
    .save-section {
        margin-left: -0.5rem;
        margin-right: -0.5rem;
        border-radius: 0.5rem;
    }
    
    .filter-checkboxes {
        grid-template-columns: 1fr;
    }
    
    .results-tabs {
        flex-direction: column;
    }
    
    .tab-button {
        border-bottom: 1px solid #e5e7eb;
    }
    
    .tab-button.active {
        border-bottom: 1px solid #3b82f6;
    }
    
    .results-table {
        font-size: 0.75rem;
    }
    
    .results-table th,
    .results-table td {
        padding: 0.5rem;
    }
}

@media (max-width: 480px) {
    .analyzer-header {
        padding: 1.5rem;
    }
    
    .analyzer-header h3 {
        font-size: 1.5rem;
    }
    
    .upload-section,
    .filters-section,
    .tab-panel,
    .save-section {
        padding: 1rem;
    }
    
    .results-table a {
        word-break: break-all;
        font-size: 0.75rem;
    }
    
    .panel-actions {
        flex-direction: column;
        align-items: stretch;
    }
}

/* Priority Badge for High Potential Pages */
.priority-badge {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    border-radius: 0.375rem;
    font-size: 0.75rem;
    font-weight: 600;
    text-align: center;
    color: white;
}

.priority-badge.high {
    background-color: #dc2626;
    color: white;
}

.priority-badge.medium {
    background-color: #f59e0b;
    color: white;
}

.priority-badge.low {
    background-color: #059669;
    color: white;
}

/* Date Range Section */
.date-range-section {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 0.5rem;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.date-range-section h5 {
    color: #1e293b;
    margin-bottom: 1rem;
    font-size: 1rem;
    font-weight: 600;
}

.date-inputs {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 1rem;
}

.date-group {
    display: flex;
    flex-direction: column;
}

.date-group label {
    color: #475569;
    font-size: 0.875rem;
    font-weight: 500;
    margin-bottom: 0.5rem;
}

.date-input,
.period-select {
    padding: 0.5rem 0.75rem;
    border: 1px solid #d1d5db;
    border-radius: 0.375rem;
    font-size: 0.875rem;
    background-color: white;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.date-input:focus,
.period-select:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.date-info {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    padding: 0.75rem;
    background: #dbeafe;
    border: 1px solid #93c5fd;
    border-radius: 0.375rem;
    color: #1e40af;
    font-size: 0.875rem;
}

.date-info i {
    margin-top: 0.125rem;
    flex-shrink: 0;
}

.date-info span {
    line-height: 1.4;
}

@media (max-width: 768px) {
    .date-inputs {
        grid-template-columns: 1fr;
    }
    
    .date-range-section {
        padding: 1rem;
    }
}

/* Language Selection Section */
.language-selection {
    margin-top: 2rem;
    padding: 1.5rem;
    background: #f0f9ff;
    border: 1px solid #e0f2fe;
    border-radius: 0.5rem;
}

.language-selection h5 {
    color: #0c4a6e;
    margin: 0 0 0.5rem 0;
    font-size: 1rem;
    font-weight: 600;
}

.language-selection p {
    color: #0369a1;
    margin: 0 0 1rem 0;
    font-size: 0.875rem;
}

.language-controls {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    padding: 1rem;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 0.375rem;
    margin-bottom: 1rem;
    justify-content: center;
}

.language-controls .btn-sm {
    padding: 0.5rem 0.75rem;
    font-size: 0.8125rem;
    display: flex;
    align-items: center;
    gap: 0.375rem;
    font-weight: 500;
}

.language-controls .btn-outline {
    background: #ffffff;
    border: 1px solid #d1d5db;
    color: #374151;
    transition: all 0.2s ease;
    cursor: pointer;
}

.language-controls .btn-outline:hover {
    background: #f9fafb;
    border-color: #9ca3af;
    color: #1f2937;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.language-controls .btn-outline:active {
    transform: translateY(0);
}

.language-controls #select-all-languages {
    background: #dbeafe;
    border-color: #3b82f6;
    color: #1e40af;
}

.language-controls #select-all-languages:hover {
    background: #bfdbfe;
    border-color: #2563eb;
    color: #1d4ed8;
}

.language-controls #deselect-all-languages {
    background: #fef2f2;
    border-color: #ef4444;
    color: #dc2626;
}

.language-controls #deselect-all-languages:hover {
    background: #fecaca;
    border-color: #dc2626;
    color: #b91c1c;
}

.language-checkboxes {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 0.75rem;
}

.language-checkbox {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 0.5rem;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.875rem;
}

.language-checkbox:hover {
    background: #f8fafc;
    border-color: #cbd5e1;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.language-checkbox input[type="checkbox"] {
    margin: 0;
    width: 1rem;
    height: 1rem;
    accent-color: #3b82f6;
}

.language-checkbox input[type="checkbox"]:checked + .language-label {
    color: #1e40af;
    font-weight: 600;
}

.language-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #374151;
    font-weight: 500;
    line-height: 1.4;
    flex: 1;
}

.language-label small {
    color: #6b7280;
    font-weight: 400;
    font-size: 0.8125rem;
}

/* Language Selection Section */
.language-selection {
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 0.5rem;
}

.language-selection h5 {
    color: #1f2937;
    margin-bottom: 0.5rem;
    font-size: 1.125rem;
    font-weight: 600;
}

.language-checkboxes {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 0.75rem;
    margin-top: 1rem;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 0.375rem;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.875rem;
}

.checkbox-label:hover {
    background: #f8fafc;
    border-color: #cbd5e1;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.checkbox-label input[type="checkbox"] {
    margin: 0;
    width: 1rem;
    height: 1rem;
    accent-color: #3b82f6;
}

.checkbox-label input[type="checkbox"]:checked + span {
    color: #1e40af;
    font-weight: 600;
}

/* Category Selection */
.category-selection {
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 0.5rem;
}

.category-selection h5 {
    color: #1f2937;
    margin-bottom: 0.5rem;
    font-size: 1.125rem;
    font-weight: 600;
}

/* Thresholds Section */
.thresholds-section {
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: #fffbeb;
    border: 1px solid #fbbf24;
    border-radius: 0.5rem;
}

.thresholds-section h5 {
    color: #92400e;
    margin-bottom: 1rem;
    font-size: 1.125rem;
    font-weight: 600;
}

.threshold-inputs {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
}

.threshold-group {
    display: flex;
    flex-direction: column;
    gap: 0.375rem;
}

.threshold-group label {
    font-weight: 500;
    color: #374151;
    font-size: 0.875rem;
}

.threshold-group small {
    color: #6b7280;
    font-size: 0.75rem;
    line-height: 1.3;
}

/* Language badges for pre-analysis */
.languages-detected {
    margin-top: 1.5rem;
}

.languages-detected h5 {
    color: #1f2937;
    margin-bottom: 1rem;
    font-size: 1.125rem;
    font-weight: 600;
}

.language-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.language-badge {
    padding: 0.375rem 0.75rem;
    border-radius: 0.375rem;
    font-size: 0.875rem;
    font-weight: 500;
    background: #f3f4f6;
    color: #374151;
}

.language-badge.lang-fr {
    background: #dbeafe;
    color: #1d4ed8;
}

.language-badge.lang-en {
    background: #fef3c7;
    color: #d97706;
}

.language-badge.lang-es {
    background: #fecaca;
    color: #dc2626;
}

.language-badge.lang-de {
    background: #e5e7eb;
    color: #374151;
}

.language-badge.lang-it {
    background: #dcfce7;
    color: #16a34a;
}

.language-badge.lang-pt {
    background: #fdf4ff;
    color: #a21caf;
}

.quality-indicator.info {
    background: #dbeafe;
    color: #1d4ed8;
    padding: 0.375rem 0.75rem;
    border-radius: 0.375rem;
    font-size: 0.875rem;
    font-weight: 500;
}

@media (max-width: 768px) {
    .language-checkboxes,
    .threshold-inputs,
    .date-inputs {
        grid-template-columns: 1fr;
    }
    
    .language-selection,
    .category-selection,
    .thresholds-section,
    .date-range-section {
        padding: 1rem;
    }
}

/* Pre-analysis Button Section Enhanced */
.pre-analysis-button-section {
    margin: 2rem 0 !important;
    text-align: center !important;
    padding: 2rem !important;
    background: #f0f9ff !important;
    border: 2px dashed #0ea5e9 !important;
    border-radius: 0.75rem !important;
}

.pre-analysis-button-section .help-text {
    margin-top: 1rem !important;
    color: #0369a1 !important;
    font-weight: 500 !important;
}

.btn-large {
    padding: 1rem 2rem !important;
    font-size: 1.125rem !important;
    font-weight: 600 !important;
}

/* Save Analysis Modal Styles */
.analysis-summary {
    margin: 1.5rem 0;
    padding: 1.5rem;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 0.5rem;
}

.analysis-summary h5 {
    color: #1f2937;
    margin: 0 0 1rem 0;
    font-size: 1rem;
    font-weight: 600;
}

.summary-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 1rem;
}

.summary-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 1rem;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 0.375rem;
}

.summary-stat .stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 0.25rem;
}

.summary-stat .stat-label {
    font-size: 0.75rem;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 500;
}

.summary-stat.redirect .stat-value {
    color: #dc2626;
}

.summary-stat.rework .stat-value {
    color: #d97706;
}

.summary-stat.potential .stat-value {
    color: #059669;
}

.form-help {
    display: block;
    margin-top: 0.25rem;
    font-size: 0.875rem;
    color: #6b7280;
}

.loading {
    opacity: 0.7;
    pointer-events: none;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #3498db;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}