/* ============================================================================
   FDA Drug Application Database - Shared Styles
   ============================================================================ */

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Color Palette */
    --primary-gradient-start: #011261;
    --primary-gradient-end: #0900ad;
    --secondary-gradient-start: #f093fb;
    --secondary-gradient-end: #f5576c;
    
    /* Colors */
    --primary-color: #667eea;
    --primary-color-hover: #0056b3;
    --secondary-color: #764ba2;
    --accent-color: #f5576c;
    --text-dark: #333;
    --text-medium: #666;
    --text-light: #999;
    --text-secondary: #6c757d;
    --bg-light: #f8f9fa;
    --bg-lighter: #f0f0f0;
    --bg-lightest: #f0f8ff;
    --white: #ffffff;
    
    /* Border Colors */
    --border-light: #e0e0e0;
    --border-lighter: #ddd;
    
    /* Status Colors */
    --status-warning-bg: #fff3cd;
    --status-warning-text: #856404;
    --status-info-bg: #cfe2ff;
    --status-info-text: #084298;
    --status-success-bg: #d1e7dd;
    --status-success-text: #0f5132;
    --status-success-color: #28a745;
    --status-success-hover: #218838;
    --status-error-bg: #f8d7da;
    --status-error-text: #721c24;
    --status-danger-color: #dc3545;
    --status-danger-hover: #c82333;
    --status-danger-bg: #f8d7da;
    --status-danger-bg-light: #fff5f5;
    
    /* Neutral Colors */
    --neutral-gray: #6c757d;
    --neutral-gray-hover: #5a6268;
    --neutral-light: #f3f3f3;
    --neutral-disabled: #ccc;
    
    /* Accent Colors */
    --accent-gold: #ffd700;
    --accent-color-hover: #e74c3c;
    
    /* Shadows */
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 15px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 20px 60px rgba(0, 0, 0, 0.3);
    --shadow-primary: 0 4px 15px rgba(102, 126, 234, 0.4);
    --shadow-primary-hover: 0 6px 20px rgba(102, 126, 234, 0.6);
    --shadow-secondary: 0 4px 15px rgba(245, 87, 108, 0.4);
    --shadow-secondary-hover: 0 6px 20px rgba(245, 87, 108, 0.6);
    
    /* Spacing */
    --spacing-xs: 5px;
    --spacing-sm: 10px;
    --spacing-md: 20px;
    --spacing-lg: 40px;
    --spacing-xl: 50px;
    
    /* Border Radius */
    --radius-sm: 8px;
    --radius-md: 15px;
    --radius-lg: 20px;
    --radius-full: 50px;
    
    /* Transitions */
    --transition-fast: 0.2s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.5s ease;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, var(--primary-gradient-start) 0%, var(--primary-gradient-end) 100%);
    min-height: 100vh;
    color: var(--text-dark);
    line-height: 1.6;
}

/* ============================================================================
   Container & Layout
   ============================================================================ */

.container {
    background: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    max-width: 1200px;
    width: 100%;
    padding: var(--spacing-xl);
    margin: 0 auto;
}

.container-wide {
    background: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    max-width: 95%;
    width: 100%;
    padding: var(--spacing-xl);
    margin: 0 auto;
}

.centered-container {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--spacing-md);
    min-height: 100vh;
}

/* ============================================================================
   Typography
   ============================================================================ */

h1 {
    color: var(--text-dark);
    font-size: 2.5em;
    margin-bottom: 15px;
    font-weight: 700;
}

h2 {
    color: var(--text-dark);
    font-size: 2em;
    margin-bottom: var(--spacing-md);
    font-weight: 600;
}

h3 {
    color: var(--text-dark);
    font-size: 1.5em;
    margin-bottom: 15px;
    font-weight: 600;
}

.subtitle {
    color: var(--text-medium);
    font-size: 1.2em;
    margin-bottom: var(--spacing-lg);
}

.text-center {
    text-align: center;
}

.text-left {
    text-align: left;
}

.text-muted {
    color: var(--text-light);
}

/* ============================================================================
   Navigation
   ============================================================================ */

.nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid #e0e0e0;
}

.nav a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    transition: all var(--transition-fast);
}

.nav a:hover {
    text-decoration: underline;
    color: var(--secondary-color);
}

/* ============================================================================
   Buttons
   ============================================================================ */

.btn {
    display: inline-block;
    padding: 15px 40px;
    background: linear-gradient(135deg, var(--primary-gradient-start) 0%, var(--primary-gradient-end) 100%);
    color: var(--white);
    text-decoration: none;
    border-radius: var(--radius-full);
    font-size: 1.1em;
    font-weight: 600;
    transition: transform var(--transition-normal), box-shadow var(--transition-normal);
    box-shadow: var(--shadow-primary);
    border: none;
    cursor: pointer;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-primary-hover);
}

.btn-secondary {
    background: linear-gradient(135deg, var(--secondary-gradient-start) 0%, var(--secondary-gradient-end) 100%);
    box-shadow: var(--shadow-secondary);
}

.btn-secondary:hover {
    box-shadow: var(--shadow-secondary-hover);
}

.btn-danger {
    background: var(--status-danger-color);
    color: var(--white);
    border: none;
    padding: 8px 16px;
    font-size: 0.85rem;
}

.btn-danger:hover {
    background: var(--status-danger-hover);
    box-shadow: 0 4px 12px rgba(220, 53, 69, 0.3);
}

.btn-small {
    padding: 10px 25px;
    font-size: 0.95em;
}

.btn-large {
    padding: 20px 50px;
    font-size: 1.2em;
}

.btn-container {
    margin-top: var(--spacing-lg);
    display: flex;
    gap: var(--spacing-md);
    justify-content: center;
    flex-wrap: wrap;
}

/* ============================================================================
   Cards & Stats
   ============================================================================ */

.card {
    background: var(--white);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-md);
    padding: 25px;
    transition: transform var(--transition-normal), box-shadow var(--transition-normal);
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: var(--spacing-md);
    margin: var(--spacing-lg) 0;
}

.stat-card {
    background: linear-gradient(135deg, var(--primary-gradient-start) 0%, var(--primary-gradient-end) 100%);
    color: var(--white);
    padding: 25px;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-md);
    text-align: center;
    transition: transform var(--transition-normal);
    text-decoration: none;
    display: block;
}

.stat-card:hover {
    transform: scale(1.05);
    cursor: pointer;
}

.stat-number {
    font-size: 2em;
    font-weight: bold;
    margin-bottom: 5px;
}

.stat-label {
    font-size: 0.9em;
    opacity: 0.9;
}

/* ============================================================================
   Content Sections
   ============================================================================ */

.content {
    background: var(--bg-light);
    padding: var(--spacing-lg);
    border-radius: var(--radius-md);
}

.features {
    text-align: left;
    margin: var(--spacing-lg) 0;
    background: var(--bg-light);
    padding: 30px;
    border-radius: var(--radius-md);
}

.features h2 {
    text-align: center;
}

.features ul {
    list-style: none;
    margin-top: var(--spacing-md);
}

.features li {
    padding: var(--spacing-sm) 0;
    color: var(--text-medium);
    font-size: 1.05em;
}

.features li:before {
    content: "✓ ";
    color: var(--primary-color);
    font-weight: bold;
    margin-right: var(--spacing-sm);
}

/* ============================================================================
   Forms
   ============================================================================ */

.form-group {
    margin-bottom: var(--spacing-md);
}

.form-label {
    display: block;
    margin-bottom: var(--spacing-xs);
    color: var(--text-dark);
    font-weight: 600;
}

.form-input,
.form-select,
.form-textarea {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: var(--radius-sm);
    font-size: 1em;
    font-family: inherit;
    transition: border-color var(--transition-fast);
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
    outline: none;
    border-color: var(--primary-color);
}

.form-textarea {
    resize: vertical;
    min-height: 100px;
}

/* ============================================================================
   Tables
   ============================================================================ */

.table {
    width: 100%;
    border-collapse: collapse;
    margin: var(--spacing-md) 0;
    background: var(--white);
    border-radius: var(--radius-sm);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.table th,
.table td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid #e0e0e0;
}

.table th {
    background: linear-gradient(135deg, var(--primary-gradient-start) 0%, var(--primary-gradient-end) 100%);
    color: var(--white);
    font-weight: 600;
}

.table tr:hover {
    background-color: var(--bg-light);
}

/* ============================================================================
   Badges & Labels
   ============================================================================ */

.badge {
    display: inline-block;
    padding: 5px 12px;
    border-radius: var(--radius-full);
    font-size: 0.85em;
    font-weight: 600;
    text-transform: uppercase;
}

.badge-primary {
    background-color: var(--primary-color);
    color: var(--white);
}

.badge-secondary {
    background-color: var(--accent-color);
    color: var(--white);
}

.badge-success {
    background-color: #28a745;
    color: var(--white);
}

.badge-warning {
    background-color: #ffc107;
    color: var(--text-dark);
}

.badge-info {
    background-color: #17a2b8;
    color: var(--white);
}

/* Additional Badge Styles for RLD/RS status variations */
.badge-rld {
    background: var(--status-success-bg);
    color: var(--status-success-text);
}

.badge-rs {
    background: var(--status-info-bg);
    color: var(--status-info-text);
}

/* RLD/RS Status Badges */
.badge-rld-yes {
    background-color: var(--status-success-color);
    color: var(--white);
    font-size: 0.75em;
    padding: 3px 8px;
}

.badge-rld-no {
    background-color: var(--status-danger-color);
    color: var(--white);
    font-size: 0.75em;
    padding: 3px 8px;
}

.badge-rs-yes {
    background-color: var(--status-success-color);
    color: var(--white);
    font-size: 0.75em;
    padding: 3px 8px;
}

.badge-rs-no {
    background-color: var(--status-danger-color);
    color: var(--white);
    font-size: 0.75em;
    padding: 3px 8px;
}

/* ============================================================================
   Utility Classes
   ============================================================================ */

.loading {
    color: var(--text-light);
    font-style: italic;
}

.coming-soon {
    font-size: 2em;
    color: var(--text-light);
    margin: var(--spacing-lg) 0;
    text-align: center;
}

.info {
    color: var(--text-medium);
    line-height: 1.6;
}

.mt-1 { margin-top: var(--spacing-sm); }
.mt-2 { margin-top: var(--spacing-md); }
.mt-3 { margin-top: var(--spacing-lg); }

.mb-1 { margin-bottom: var(--spacing-sm); }
.mb-2 { margin-bottom: var(--spacing-md); }
.mb-3 { margin-bottom: var(--spacing-lg); }

.p-1 { padding: var(--spacing-sm); }
.p-2 { padding: var(--spacing-md); }
.p-3 { padding: var(--spacing-lg); }

/* ============================================================================
   Responsive Design
   ============================================================================ */

@media (max-width: 768px) {
    h1 {
        font-size: 2em;
    }
    
    h2 {
        font-size: 1.5em;
    }
    
    .container {
        padding: var(--spacing-md);
    }
    
    .stats-grid {
        grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
        gap: 15px;
    }
    
    .stat-number {
        font-size: 1.5em;
    }
    
    .btn-container {
        flex-direction: column;
    }
    
    .btn {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .stats-grid {
        grid-template-columns: 1fr 1fr;
    }
}

/* ============================================================================
   Suggested Matches Styles
   ============================================================================ */

/* Suggested Matches Section */
.suggested-matches-section {
    margin-top: 30px;
    background: var(--white);
    border: 2px dashed var(--border-light);
    border-radius: var(--radius-sm);
    padding: 25px;
}

.suggested-matches-header {
    text-align: center;
    margin-bottom: 20px;
}

.suggested-matches-title {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.suggested-matches-subtitle {
    font-size: 0.9rem;
    color: var(--text-secondary);
    font-style: italic;
}

.suggested-matches-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

/* Suggested Match Cards */
.suggested-match-card {
    background: var(--bg-light);
    border: 2px solid var(--border-light);
    border-radius: var(--radius-sm);
    padding: 18px;
    cursor: move;
    transition: all var(--transition-fast);
    position: relative;
    border-style: dashed;
}

.suggested-match-card:hover {
    border-color: var(--accent-color);
    box-shadow: var(--shadow-md);
    background: var(--white);
}

.suggested-match-card.dragging {
    opacity: 0.5;
    cursor: grabbing;
}

/* Suggested ANDA Info */
.suggested-anda-header {
    display: flex;
    justify-content: space-between;
    align-items: start;
    margin-bottom: 15px;
}

.suggested-anda-info {
    flex: 1;
}

.suggested-anda-number {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--accent-color);
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.suggested-anda-scores {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 8px;
}

/* Similarity Scoring */
.similarity-score {
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--accent-color);
}

.similarity-details {
    font-size: 0.8rem;
    color: var(--text-secondary);
    text-align: right;
}

.similarity-breakdown {
    display: flex;
    gap: 12px;
    margin-top: 10px;
    flex-wrap: wrap;
}

.similarity-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
}

.similarity-label {
    font-size: 0.7rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    font-weight: 500;
}

.similarity-value {
    font-size: 0.85rem;
    font-weight: 600;
    padding: 2px 6px;
    border-radius: 3px;
    background: var(--bg-light);
    color: var(--text-dark);
}

.similarity-value.high {
    background: var(--status-success-bg);
    color: var(--status-success-text);
}

.similarity-value.medium {
    background: var(--status-warning-bg);
    color: var(--status-warning-text);
}

.similarity-value.low {
    background: var(--status-danger-bg);
    color: var(--status-error-text);
}

/* Suggestion Promotion Button */
.btn-promote-suggestion {
    background: var(--status-success-color);
    color: var(--white);
    border: none;
    padding: 6px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.8rem;
    transition: all var(--transition-fast);
    font-weight: 500;
    margin-left: 10px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.btn-promote-suggestion:hover {
    background: var(--status-success-hover);
    transform: translateY(-1px);
}

/* Drop Zone for Promoting Suggestions */
.anda-list.drop-zone-active {
    background: var(--bg-lightest);
    border: 2px dashed var(--accent-color);
    border-radius: var(--radius-sm);
    margin: 10px 0;
    padding: 20px;
}

.drop-zone-hint {
    text-align: center;
    color: var(--accent-color);
    font-size: 0.9rem;
    font-weight: 500;
    padding: 10px;
    display: none;
}

.anda-list.drop-zone-active .drop-zone-hint {
    display: block;
}

/* ============================================================================
   Match Query Styles
   ============================================================================ */

.query-header-card {
    background: var(--white);
    border: 1px solid var(--border-light);
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 30px;
}

.query-header-title {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.query-title {
    font-size: 1.5rem;
    font-weight: 600;
    margin: 0;
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    transition: background-color 0.2s ease;
}

.query-title:hover {
    background-color: var(--background-light);
}

.query-name-editor {
    font-size: 1.5rem;
    font-weight: 600;
    margin: 0;
    padding: 4px;
    border: 2px solid var(--primary-color);
    border-radius: 4px;
    background: var(--background-color);
    color: var(--text-color);
    font-family: inherit;
    width: 100%;
    max-width: 400px;
}

.query-status {
    padding: 6px 16px;
    border-radius: 12px;
    font-size: 0.9rem;
    font-weight: 500;
}

.status-pending {
    background: var(--status-warning-bg);
    color: var(--status-warning-text);
}

.status-in_progress {
    background: var(--status-info-bg);
    color: var(--status-info-text);
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.status-in_progress:hover {
    background: var(--status-success-color);
    color: var(--white);
    transform: scale(1.05);
}

.status-in_progress::after {
    content: 'IN PROGRESS';
    transition: all 0.3s ease;
}

.status-in_progress:hover::after {
    content: '✓ MARK AS COMPLETED';
}

.status-completed {
    background: var(--status-success-bg);
    color: var(--status-success-text);
}

/* Enhanced Query Meta Grid */
.query-meta-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 2fr;
    gap: 30px;
    margin-bottom: 20px;
    padding: 15px 0;
}

@media (max-width: 1200px) {
    .query-meta-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
}

.meta-column {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.meta-column.verification-column {
    border-left: 2px solid var(--border-light);
    padding-left: 25px;
}

@media (max-width: 1200px) {
    .meta-column.verification-column {
        border-left: none;
        border-top: 2px solid var(--border-light);
        padding-left: 0;
        padding-top: 20px;
    }
}

.meta-item {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.meta-label {
    font-size: 0.85rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.meta-value {
    font-size: 1rem;
    color: var(--text-dark);
    font-weight: 500;
}

.controls {
    display: flex;
    gap: 20px;
    margin-bottom: 30px;
    flex-wrap: wrap;
    align-items: center;
}

.control-group {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.control-group label {
    font-size: 0.9rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.control-group select {
    padding: 8px 12px;
    border: 1px solid var(--border-lighter);
    border-radius: 4px;
    font-size: 1rem;
    background: var(--white);
    cursor: pointer;
}

.control-group input[type="checkbox"] {
    width: 16px;
    height: 16px;
    cursor: pointer;
    margin-top: 6px;
}

.matches-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.match-card {
    background: var(--white);
    border: 1px solid var(--border-light);
    border-radius: 8px;
    padding: 20px;
    transition: all 0.3s ease;
    cursor: pointer;
    text-decoration: none;
    color: inherit;
    display: block;
}

.match-card:hover {
    border-color: var(--primary-color);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.match-header {
    display: flex;
    justify-content: space-between;
    align-items: start;
    margin-bottom: 15px;
}

.match-nda-info {
    flex: 1;
}

.match-nda-number {
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 8px;
}

.match-product-info {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.product-field {
    display: flex;
    gap: 5px;
}

.product-field-label {
    font-weight: 500;
}

.match-stats {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 8px;
}

.uncertainty-score {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--status-danger-color);
}

.uncertainty-label {
    font-size: 0.8rem;
    color: var(--text-secondary);
    text-align: right;
}

.match-count-badge {
    background: var(--primary-color);
    color: var(--white);
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 0.85rem;
    font-weight: 500;
}

.verified-badge {
    background: var(--status-success-bg);
    color: var(--status-success-text);
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 0.85rem;
    font-weight: 500;
}

.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-secondary);
}

.empty-state-icon {
    font-size: 4rem;
    margin-bottom: 20px;
    opacity: 0.3;
}

/* Pagination Styles */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin: 30px 0;
    padding: 20px;
    background: var(--white);
    border: 1px solid var(--border-light);
    border-radius: 8px;
}

.pagination-info {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-right: 20px;
}

.pagination-button {
    background: var(--white);
    border: 1px solid var(--border-lighter);
    color: var(--text-dark);
    padding: 8px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.2s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.pagination-button:hover:not(:disabled) {
    background: var(--primary-color);
    color: var(--white);
    border-color: var(--primary-color);
}

.pagination-button:disabled {
    background: var(--bg-light);
    color: var(--text-light);
    cursor: not-allowed;
    border-color: var(--border-lighter);
}

.pagination-button.current {
    background: var(--primary-color);
    color: var(--white);
    border-color: var(--primary-color);
}

/* Progress Circle Styles */
.progress-circle {
    position: relative;
    width: 60px;
    height: 60px;
    margin: 0 15px;
}

.progress-circle svg {
    transform: rotate(-90deg);
    width: 100%;
    height: 100%;
}

.progress-circle .progress-bg {
    fill: none;
    stroke: var(--border-light);
    stroke-width: 4;
}

.progress-circle .progress-bar {
    fill: none;
    stroke: var(--status-success-color);
    stroke-width: 4;
    stroke-linecap: round;
    transition: stroke-dasharray 0.5s ease;
}

.progress-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-dark);
    text-align: center;
    line-height: 1;
}

.verification-stats {
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-width: 0;
    flex: 1;
}

.verification-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 10px;
}

.progress-details-large {
    font-size: 1.1rem;
    color: var(--text-dark);
    font-weight: 500;
}

.progress-meta {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 10px 0;
}

.progress-circle-large {
    position: relative;
    width: 100px;
    height: 100px;
    margin: 10px 20px 10px 0;
    flex-shrink: 0;
}

.progress-circle-large svg {
    transform: rotate(-90deg);
    width: 100px;
    height: 100px;
    overflow: visible;
}

.progress-circle-large .progress-bg {
    fill: none;
    stroke: var(--border-light);
    stroke-width: 6;
}

.progress-circle-large .progress-bar {
    fill: none;
    stroke: var(--status-success-color);
    stroke-width: 6;
    stroke-linecap: round;
    transition: stroke-dasharray 0.5s ease;
}

.progress-text-large {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text-dark);
    text-align: center;
    line-height: 1;
}

.query-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
}

.verification-progress {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* ============================================================================
   Match Details Styles (view_match.html)
   ============================================================================ */

.match-header-card {
    background: var(--white);
    border: 1px solid var(--border-light);
    border-radius: 8px;
    padding: 25px;
    margin-bottom: 30px;
}

.nda-title {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 15px;
}

.product-details-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 20px;
}

@media (max-width: 1200px) {
    .product-details-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .product-details-grid {
        grid-template-columns: 1fr;
    }
}

.detail-item {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.detail-label {
    font-size: 0.85rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.detail-value {
    font-size: 1.1rem;
    color: var(--text-dark);
    font-weight: 500;
}

.companies-list {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.company-item {
    font-size: 0.95rem;
    color: var(--text-dark);
    padding: 2px 6px;
    background: var(--bg-light);
    border-radius: 3px;
    border-left: 3px solid var(--primary-color);
}

.verification-section {
    display: flex;
    align-items: center;
    gap: 15px;
    padding-top: 20px;
    border-top: 1px solid var(--border-light);
    flex-wrap: wrap;
}

.unverified-badge {
    background: var(--status-warning-bg);
    color: var(--status-warning-text);
    padding: 8px 16px;
    border-radius: 12px;
    font-size: 0.95rem;
    font-weight: 500;
}

.btn-verify {
    background: var(--status-success-color);
    color: var(--white);
    border: none;
    padding: 10px 20px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.95rem;
    transition: background 0.2s ease;
}

.btn-verify:hover {
    background: var(--status-success-hover);
}

.btn-delete-match {
    background: var(--status-danger-color);
    color: var(--white);
    border: none;
    padding: 10px 20px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.95rem;
    transition: background 0.2s ease;
    font-weight: 500;
    margin-left: auto;
}

.btn-delete-match:hover {
    background: var(--status-danger-hover);
}

.btn-delete-match:disabled {
    background: var(--neutral-gray);
    cursor: not-allowed;
}

.controls-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--white);
    border: 1px solid var(--border-light);
    border-radius: 8px;
    padding: 15px 20px;
    margin-bottom: 20px;
}

.anda-count {
    font-size: 1.1rem;
    color: var(--text-dark);
    display: flex;
    align-items: center;
    gap: 15px;
}

.anda-count strong {
    color: var(--primary-color);
}

.drag-instruction {
    font-size: 0.9rem;
    color: var(--text-secondary);
    font-style: italic;
}

.action-buttons {
    display: flex;
    gap: 10px;
}

.btn-save {
    background: var(--primary-color);
    color: var(--white);
    border: none;
    padding: 10px 20px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.95rem;
    transition: background 0.2s ease;
    font-weight: 500;
}

.btn-save:hover {
    background: var(--primary-color-hover);
}

.btn-save:disabled {
    background: var(--neutral-gray);
    cursor: not-allowed;
}

.btn-reset {
    background: var(--neutral-gray);
    color: var(--white);
    border: none;
    padding: 10px 20px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.95rem;
    transition: background 0.2s ease;
}

.btn-reset:hover {
    background: var(--neutral-gray-hover);
}

.anda-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.anda-card {
    background: var(--white);
    border: 2px solid var(--border-light);
    border-radius: 8px;
    padding: 20px;
    cursor: move;
    transition: all 0.2s ease;
    position: relative;
}

.anda-card:hover {
    border-color: var(--primary-color);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.anda-card.dragging {
    opacity: 0.5;
    cursor: grabbing;
}

.anda-card.drag-over {
    border-color: var(--primary-color);
    border-style: dashed;
    background: var(--bg-lightest);
}

.rank-badge {
    position: absolute;
    top: -10px;
    left: -10px;
    background: var(--primary-color);
    color: var(--white);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.1rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.rank-badge.first {
    background: var(--accent-gold);
    color: var(--text-dark);
}

.btn-delete-anda {
    background: var(--status-danger-color);
    color: var(--white);
    border: none;
    padding: 4px 8px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.75rem;
    transition: all 0.2s ease;
    font-weight: 500;
    margin-left: 10px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    opacity: 0.8;
}

.btn-delete-anda:hover {
    background: var(--status-danger-hover);
    opacity: 1;
    transform: translateY(-1px);
}

.anda-header {
    display: flex;
    justify-content: space-between;
    align-items: start;
    margin-bottom: 15px;
}

.anda-info {
    flex: 1;
}

.anda-number {
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
}

.anda-product-info {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.anda-scores {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 8px;
}

.match-score {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-color);
}

.score-details {
    font-size: 0.85rem;
    color: var(--text-secondary);
    text-align: right;
}

.anda-metadata {
    display: flex;
    gap: 10px;
    margin-top: 12px;
    flex-wrap: wrap;
}

.metadata-badge {
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 500;
}

.approval-date {
    margin-top: 8px;
    font-size: 0.85rem;
    color: var(--text-secondary);
    font-style: italic;
    padding: 4px 8px;
    background: var(--bg-light);
    border-radius: 4px;
    border-left: 3px solid var(--status-success-color);
    display: inline-block;
}

.approval-and-status-row {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-top: 8px;
    flex-wrap: wrap;
}

.status-badges {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.submissions-section {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid var(--border-light);
}

.submissions-header {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    user-select: none;
    padding: 8px 12px;
    background: var(--bg-light);
    border-radius: 4px;
    transition: background 0.2s ease;
}

.submissions-header:hover {
    background: var(--border-light);
}

.submissions-toggle {
    font-size: 0.9rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.toggle-icon {
    transition: transform 0.3s ease;
}

.toggle-icon.open {
    transform: rotate(180deg);
}

.submissions-list {
    margin-top: 10px;
    display: none;
    flex-direction: column;
    gap: 8px;
}

.submissions-list.show {
    display: flex;
}

.submission-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 12px;
    background: var(--bg-light);
    border-radius: 4px;
    font-size: 0.85rem;
}

.submission-info {
    display: flex;
    gap: 15px;
    color: var(--text-secondary);
}

.submission-label {
    font-weight: 500;
    color: var(--text-dark);
}

.submission-link {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease;
}

.submission-link:hover {
    color: var(--primary-color-hover);
    text-decoration: underline;
}

.no-submissions {
    padding: 10px;
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.85rem;
}

.changes-indicator {
    background: var(--status-warning-bg);
    color: var(--status-warning-text);
    padding: 10px 15px;
    border-radius: 4px;
    font-size: 0.9rem;
    display: none;
}

.changes-indicator.show {
    display: block;
}

.nav-left {
    display: flex;
    align-items: center;
}

.nav-right {
    display: flex;
    align-items: center;
}

.btn-next-match {
    background: var(--primary-color);
    color: var(--white);
    border: none;
    padding: 10px 20px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.95rem;
    transition: all 0.2s ease;
    font-weight: 500;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-next-match:hover {
    background: var(--primary-color-hover);
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.btn-next-match:disabled {
    background: var(--neutral-gray);
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.btn-next-match:disabled:hover {
    background: var(--neutral-gray);
}

/* ============================================================================
   Matching Queries Styles (matching.html)
   ============================================================================ */

.queries-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-top: 20px;
}

@media (max-width: 1200px) {
    .queries-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .queries-grid {
        grid-template-columns: 1fr;
    }
}

.query-card {
    background: var(--white);
    border: 1px solid var(--border-light);
    border-radius: 8px;
    padding: 20px;
    transition: all 0.3s ease;
    cursor: pointer;
}

.query-card:hover {
    border-color: var(--primary-color);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.query-header {
    display: flex;
    justify-content: space-between;
    align-items: start;
    margin-bottom: 15px;
}

.query-name {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-dark);
    margin: 0;
}

.query-meta {
    display: flex;
    flex-direction: column;
    gap: 8px;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.query-meta-row {
    display: flex;
    justify-content: space-between;
}

.query-meta-label {
    font-weight: 500;
}

.query-stats {
    display: flex;
    gap: 15px;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid var(--bg-lighter);
}

.query-stat {
    flex: 1;
    text-align: center;
}

.query-stat-value {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--primary-color);
}

.query-stat-label {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-top: 4px;
}
