/* Modern Clinical Validation Dashboard Styles */
/* Professional medical interface design for Thakaamed AI */

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

/* Floating/Sticky Image Panel Styles */
.floating-image-panel {
    position: fixed;
    top: 20px;
    right: 20px;
    width: 320px;
    max-height: 90vh;
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    border: 1px solid #e2e8f0;
    z-index: 1000;
    overflow: hidden;
    transition: all 0.3s ease;
    transform: translateX(100%);
    opacity: 0;
}

.floating-image-panel.active {
    transform: translateX(0);
    opacity: 1;
}

.floating-panel-header {
    background: linear-gradient(135deg, #9370DB, #663399);
    color: white;
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.floating-panel-title {
    font-size: 16px;
    font-weight: 600;
    margin: 0;
}

.floating-panel-controls {
    display: flex;
    gap: 8px;
}

.floating-control-btn {
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    padding: 6px 10px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    transition: all 0.2s ease;
}

.floating-control-btn:hover {
    background: rgba(255, 255, 255, 0.3);
}

.floating-panel-content {
    padding: 0;
    max-height: calc(90vh - 70px);
    overflow-y: auto;
}

.floating-image-container {
    position: relative;
    background: #f8fafc;
}

.floating-image-container img {
    width: 100%;
    height: auto;
    display: block;
    cursor: zoom-in;
}

.floating-image-info {
    padding: 12px 16px;
    border-top: 1px solid #e2e8f0;
    background: white;
}

.floating-image-title {
    font-size: 14px;
    font-weight: 600;
    color: #1a1a1a;
    margin-bottom: 4px;
}

.floating-image-meta {
    font-size: 12px;
    color: #64748b;
    margin-bottom: 8px;
}

.floating-image-actions {
    display: flex;
    gap: 8px;
}

.floating-action-btn {
    flex: 1;
    padding: 8px 12px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.floating-action-btn:hover {
    background: #e2e8f0;
    border-color: #9370DB;
}

.floating-action-btn.primary {
    background: #9370DB;
    color: white;
    border-color: #9370DB;
}

.floating-action-btn.primary:hover {
    background: #7c3aed;
}

/* Sticky behavior when scrolling */
.floating-image-panel.sticky {
    position: sticky;
    top: 20px;
    float: right;
    margin-left: 20px;
    margin-bottom: 20px;
}

@media (max-width: 1024px) {
    .floating-image-panel {
        width: 280px;
        right: 10px;
        top: 10px;
    }
}

@media (max-width: 768px) {
    .floating-image-panel {
        width: calc(100vw - 20px);
        right: 10px;
        left: 10px;
        top: 10px;
    }
}

/* Clickable Finding Styles */
.clickable-finding {
    cursor: pointer;
    transition: all 0.2s ease;
    border-left: 3px solid transparent;
}

.clickable-finding:hover {
    background-color: rgba(147, 112, 219, 0.05);
    border-left-color: #9370DB;
    transform: translateX(3px);
}

.navigate-icon {
    background: rgba(147, 112, 219, 0.1);
    color: #9370DB;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 10px;
    margin-left: 8px;
}

.click-hint {
    font-size: 11px;
    color: #64748b;
    font-style: italic;
    margin-top: 4px;
    opacity: 0.7;
}

.analysis-data-indicator {
    font-size: 10px;
    color: #059669;
    background: rgba(16, 185, 129, 0.1);
    padding: 2px 6px;
    border-radius: 3px;
    margin-top: 4px;
    display: inline-block;
}

/* Enhanced coordinate info styling */
#coordinate-info {
    position: absolute;
    bottom: 40px;
    left: 10px;
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 6px 10px;
    border-radius: 4px;
    font-size: 12px;
    font-family: monospace;
    z-index: 10;
}

/* Problem item enhancements */
.problem-item.actual-problem {
    border-left: 3px solid #ef4444;
}

.problem-item.normal-finding {
    border-left: 3px solid #10b981;
}

.normal-indicator {
    background: rgba(16, 185, 129, 0.1);
    color: #059669;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 600;
    margin-left: 8px;
}

/* Embedded Link Styles */
.embedded-link-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.embedded-link-card .stat-value {
    color: white;
}

.embedded-link {
    color: white !important;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.2s ease;
    display: block;
    padding: 4px 8px;
    border-radius: 4px;
}

.embedded-link:hover {
    background: rgba(255, 255, 255, 0.2);
    text-decoration: underline;
}

/* Embedded Analysis Link in Clinical Notes */
.embedded-analysis-link {
    color: #667eea;
    text-decoration: none;
    font-weight: 600;
    padding: 8px 16px;
    border: 2px solid #667eea;
    border-radius: 6px;
    display: inline-block;
    transition: all 0.2s ease;
    background: rgba(102, 126, 234, 0.1);
}

.embedded-analysis-link:hover {
    background: #667eea;
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(102, 126, 234, 0.3);
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: #1a1a1a;
    background-color: #f8fafc;
    font-size: 16px;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header Styles */
.header {
    background: linear-gradient(135deg, #9370DB, #663399);
    color: white;
    padding: 20px 0;
    box-shadow: 0 4px 20px rgba(147, 112, 219, 0.15);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
}

.logo-section {
    display: flex;
    align-items: center;
    gap: 20px;
}

.header-logo {
    height: 45px;
    width: auto;
    filter: brightness(0) invert(1);
}

.header-text h1 {
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 4px;
}

.header-text p {
    font-size: 14px;
    opacity: 0.9;
}

.header-stats {
    display: flex;
    gap: 30px;
}

.stat-item {
    text-align: center;
    min-width: 80px;
}

.stat-number {
    display: block;
    font-size: 24px;
    font-weight: 700;
    line-height: 1;
}

.stat-label {
    display: block;
    font-size: 12px;
    opacity: 0.8;
    margin-top: 4px;
}

/* Main Content */
.main-content {
    padding: 40px 0;
}

/* Stats Section */
.stats-section {
    margin-bottom: 50px;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: white;
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    border: 1px solid #e2e8f0;
    display: flex;
    align-items: center;
    gap: 20px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.12);
}

.stat-icon {
    font-size: 32px;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #9370DB, #663399);
    border-radius: 50%;
    filter: grayscale(0.2);
}

.stat-content h3 {
    font-size: 28px;
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 4px;
}

.stat-content p {
    font-size: 14px;
    color: #64748b;
}

/* Analytics Section */
.analytics-section {
    margin-bottom: 50px;
}

.analytics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 25px;
}

.chart-card {
    background: white;
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    border: 1px solid #e2e8f0;
}

.chart-title {
    font-size: 18px;
    font-weight: 600;
    color: #1a1a1a;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.chart-icon {
    font-size: 20px;
}

.chart-container {
    position: relative;
    height: 300px;
}

/* Filter Section */
.filter-section {
    margin-bottom: 40px;
}

.filter-controls {
    background: white;
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    border: 1px solid #e2e8f0;
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    align-items: center;
}

.search-box {
    display: flex;
    align-items: center;
    flex: 1;
    min-width: 300px;
}

.search-input {
    flex: 1;
    padding: 12px 16px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 14px;
    transition: border-color 0.2s ease;
}

.search-input:focus {
    outline: none;
    border-color: #9370DB;
}

.search-btn {
    padding: 12px 16px;
    background: #9370DB;
    color: white;
    border: none;
    border-radius: 8px;
    margin-left: 8px;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.search-btn:hover {
    background: #663399;
}

.filter-options {
    display: flex;
    gap: 15px;
    align-items: center;
}

.filter-select {
    padding: 10px 12px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 14px;
    background: white;
    min-width: 150px;
}

.reset-btn {
    padding: 10px 16px;
    background: #64748b;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.2s ease;
}

.reset-btn:hover {
    background: #475569;
}

/* Cases Section */
.cases-section {
    margin-bottom: 50px;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.section-title {
    font-size: 24px;
    font-weight: 600;
    color: #1a1a1a;
}

.view-controls {
    display: flex;
    gap: 10px;
}

.view-btn {
    padding: 8px 16px;
    border: 2px solid #e2e8f0;
    background: white;
    color: #64748b;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s ease;
}

.view-btn.active,
.view-btn:hover {
    background: #9370DB;
    color: white;
    border-color: #9370DB;
}

/* Export button in header */
.export-data-btn {
    margin-right: 12px;
}

/* Cases Grid */
.cases-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 25px;
}

.case-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    border: 1px solid #e2e8f0;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    cursor: pointer;
}

.case-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.case-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    background: #f1f5f9;
}

.case-content {
    padding: 20px;
}

.case-id {
    font-size: 16px;
    font-weight: 600;
    color: #1a1a1a;
    margin-bottom: 8px;
}

.case-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 12px;
}

.case-stat {
    font-size: 14px;
    color: #64748b;
}

.case-stat strong {
    color: #1a1a1a;
}

.case-problems {
    margin-bottom: 12px;
}

.case-problems-title {
    font-size: 12px;
    color: #64748b;
    margin-bottom: 6px;
}

.case-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.case-tag {
    padding: 2px 8px;
    background: #f1f5f9;
    color: #475569;
    border-radius: 12px;
    font-size: 11px;
}

.case-tag.high-priority {
    background: #fef2f2;
    color: #dc2626;
}

.case-tag.medium-priority {
    background: #fffbeb;
    color: #d97706;
}

.confidence-score {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 12px;
    border-top: 1px solid #e2e8f0;
}

.confidence-label {
    font-size: 12px;
    color: #64748b;
}

.confidence-value {
    font-size: 14px;
    font-weight: 600;
    color: #059669;
}

/* List View */
.cases-grid.list-view {
    display: block;
}

.cases-grid.list-view .case-card {
    display: flex;
    margin-bottom: 15px;
}

.cases-grid.list-view .case-image {
    width: 120px;
    height: 80px;
    flex-shrink: 0;
}

.cases-grid.list-view .case-content {
    flex: 1;
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.cases-grid.list-view .case-stats {
    display: flex;
    gap: 20px;
}

/* Load More Button */
.load-more-section {
    text-align: center;
    margin-top: 40px;
}

.load-more-btn {
    padding: 12px 30px;
    background: #9370DB;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.load-more-btn:hover {
    background: #663399;
}

.load-more-btn:disabled {
    background: #94a3b8;
    cursor: not-allowed;
}

/* Footer */
.footer {
    background: #1e293b;
    color: white;
    padding: 30px 0;
    margin-top: 60px;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer-brand {
    display: flex;
    align-items: center;
    gap: 15px;
}

.footer-logo {
    height: 40px;
    width: auto;
    filter: brightness(0) invert(1);
}

.footer-stats {
    text-align: right;
    font-size: 14px;
    color: #94a3b8;
}

/* Responsive Design */
@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        text-align: center;
        gap: 20px;
    }

    .header-stats {
        gap: 20px;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }

    .analytics-grid {
        grid-template-columns: 1fr;
    }

    .filter-controls {
        flex-direction: column;
        align-items: stretch;
    }

    .search-box {
        min-width: auto;
    }

    .filter-options {
        justify-content: center;
        flex-wrap: wrap;
    }

    .section-header {
        flex-direction: column;
        gap: 15px;
        align-items: stretch;
    }

    .view-controls {
        justify-content: center;
    }

    .cases-grid {
        grid-template-columns: 1fr;
    }

    .footer-content {
        flex-direction: column;
        gap: 20px;
        text-align: center;
    }

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

@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }

    .main-content {
        padding: 20px 0;
    }

    .stat-card {
        padding: 20px;
        flex-direction: column;
        text-align: center;
        gap: 15px;
    }

    .chart-card {
        padding: 20px;
    }

    .chart-container {
        height: 250px;
    }

    .case-content {
        padding: 15px;
    }
}

/* Loading States */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

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

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

/* Utility Classes */
.text-center { text-align: center; }
.text-right { text-align: right; }
.hidden { display: none; }
.visible { display: block; }
.fade-in { animation: fadeIn 0.3s ease-in; }

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Clinical Findings Enhancement Styles */
.findings-section-title {
    margin: 30px 0 20px;
    padding: 15px 20px;
    border-radius: 8px;
    font-size: 18px;
    font-weight: 600;
}

.findings-section-title:first-child {
    margin-top: 0;
}

.findings-section-title:contains("Clinical Problems") {
    background: linear-gradient(135deg, #fee2e2, #fecaca);
    color: #dc2626;
    border-left: 4px solid #dc2626;
}

.findings-section-title:contains("Normal Clinical") {
    background: linear-gradient(135deg, #f0f9ff, #dbeafe);
    color: #2563eb;
    border-left: 4px solid #2563eb;
}

.findings-section-title:contains("Dental Restorations") {
    background: linear-gradient(135deg, #fffbeb, #fef3c7);
    color: #d97706;
    border-left: 4px solid #d97706;
}

/* Problem Count Badges */
.problem-count-badge.high-priority {
    background: #dc2626;
    color: white;
}

.problem-count-badge.normal {
    background: #059669;
    color: white;
}

.problem-count-badge.restoration {
    background: #f59e0b;
    color: white;
}

/* Problem Items */
.problem-item.actual-problem {
    border-left: 4px solid #dc2626;
    background: #fef2f2;
}

.problem-item.normal-finding {
    border-left: 4px solid #059669;
    background: #f0fdf4;
}

.problem-item.restoration {
    border-left: 4px solid #f59e0b;
    background: #fffbeb;
}

.normal-indicator {
    background: #059669;
    color: white;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
    margin-left: 8px;
}

.restoration-indicator {
    background: #f59e0b;
    color: white;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
    margin-left: 8px;
}

/* Normal Findings Section */
.normal-findings {
    opacity: 0.85;
}

.normal-findings .tooth-problems-header h4 {
    color: #047857;
}

/* No Problems Message */
.no-problems-message {
    text-align: center;
    padding: 40px 20px;
    background: linear-gradient(135deg, #f0fdf4, #dcfce7);
    border-radius: 12px;
    color: #166534;
    font-size: 18px;
    border: 2px solid #bbf7d0;
    margin-bottom: 30px;
}

/* Dental Chart Enhancements */
.tooth.healthy {
    background: #f0fdf4;
    border-color: #bbf7d0;
    color: #166534;
}

.tooth.healthy:hover {
    background: #dcfce7;
    border-color: #86efac;
}

/* Priority Classes for Tags */
.case-tag.normal-finding {
    background: linear-gradient(135deg, #059669, #047857);
    color: white;
}

.case-tag.high-priority {
    background: linear-gradient(135deg, #dc2626, #b91c1c);
    color: white;
}

.case-tag.medium-priority {
    background: linear-gradient(135deg, #d97706, #b45309);
    color: white;
}

.case-tag.low-priority {
    background: linear-gradient(135deg, #6b7280, #4b5563);
    color: white;
}
/* ========================================
   PNU PEDIATRIC DENTISTRY ENHANCEMENTS
   ======================================== */

/* Primary/Permanent Dentition Colors */
.tooth-primary {
    background: #bfdbfe;
    border-color: #3b82f6 !important;
    color: #1e40af;
}

.tooth-permanent {
    background: #d1fae5;
    border-color: #10b981 !important;
    color: #065f46;
}

.tooth-with-findings {
    background: #fef3c7;
    border-color: #f59e0b !important;
    color: #92400e;
}

.tooth-unerupted {
    background: #f3f4f6;
    border-color: #d1d5db !important;
    color: #6b7280;
}

.tooth-missing {
    background: #fee2e2;
    border-color: #ef4444 !important;
    color: #991b1b;
}

/* Unerupted Badge on Tooth */
.unerupted-badge {
    position: absolute;
    top: 2px;
    right: 2px;
    background: #9370DB;
    color: white;
    font-size: 8px;
    padding: 1px 4px;
    border-radius: 3px;
    font-weight: 700;
}

/* Teeth Stats Mini */
.teeth-stats-mini {
    display: flex;
    gap: 20px;
    justify-content: center;
    margin-bottom: 15px;
    padding: 10px;
    background: #f8fafc;
    border-radius: 8px;
    font-size: 13px;
    color: #64748b;
}

.teeth-stats-mini strong {
    color: #1e293b;
    font-weight: 700;
    font-size: 16px;
    margin-left: 5px;
}

/* Primary/Permanent Section Styling */
.primary-teeth-section {
    border-left: 4px solid #3b82f6;
}

.permanent-teeth-section {
    border-left: 4px solid #10b981;
}

/* Eruption Status Card on Case Cards */
.eruption-status-card {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin: 15px 0;
    padding: 15px;
    background: linear-gradient(135deg, #f8fafc, #f1f5f9);
    border-radius: 8px;
    border: 1px solid #e2e8f0;
}

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

.eruption-label {
    font-size: 11px;
    color: #64748b;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.eruption-value {
    font-size: 28px;
    font-weight: 700;
    color: #1e293b;
    margin-top: 5px;
}

.unerupted-count {
    color: #9370DB;
}

.erupted-count {
    color: #10b981;
}

/* Dentition Breakdown Bar */
.dentition-breakdown {
    margin: 12px 0;
}

.dentition-bar {
    display: flex;
    height: 35px;
    border-radius: 8px;
    overflow: hidden;
    border: 2px solid #e2e8f0;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.dentition-segment {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 600;
    color: white;
    transition: all 0.3s ease;
    position: relative;
}

.dentition-segment:hover {
    filter: brightness(1.1);
}

.dentition-segment.primary {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
}

.dentition-segment.permanent {
    background: linear-gradient(135deg, #10b981, #059669);
}

/* Problem Badges */
.case-problems {
    display: flex;
    gap: 8px;
    margin: 10px 0;
    flex-wrap: wrap;
}

.problem-badge {
    padding: 5px 12px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.problem-badge.severe {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fca5a5;
}

.problem-badge.restoration {
    background: #d1fae5;
    color: #065f46;
    border: 1px solid #6ee7b7;
}

.problem-badge.developmental {
    background: #e0e7ff;
    color: #4338ca;
    border: 1px solid #a5b4fc;
}

/* Badge Styles for Demographics */
.badge {
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    display: inline-block;
}

.badge-age {
    background: #e0e7ff;
    color: #4338ca;
}

.badge-male {
    background: #dbeafe;
    color: #1e40af;
}

.badge-female {
    background: #fce7f3;
    color: #9f1239;
}

.badge-dentition {
    background: #f3e8ff;
    color: #6b21a8;
}

/* Header Logo Styling */
.header-logo {
    height: 50px;
    width: auto;
    object-fit: contain;
    margin-right: 20px;
}

.logo-section {
    display: flex;
    align-items: center;
    gap: 15px;
}

/* Responsive Adjustments for Dual Charts */
@media (max-width: 1200px) {
    .case-content-grid {
        grid-template-columns: 1fr;
    }
    
    .teeth-stats-mini {
        flex-direction: column;
        gap: 10px;
    }
}

/* Print Styles for Dual Charts */
@media print {
    .primary-teeth-section,
    .permanent-teeth-section {
        page-break-inside: avoid;
        margin-bottom: 30px;
    }
}

/* Enhanced Tooth Chart Visual Borders */
.tooth-primary.tooth-detected,
.tooth-permanent.tooth-detected {
    border: 3px solid #1e293b !important;
    box-shadow: 0 0 0 2px rgba(30, 41, 59, 0.2);
}

.tooth-missing {
    border: 3px solid #dc2626 !important;
    box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.3);
}

.tooth-with-findings {
    border: 3px solid #d97706 !important;
    box-shadow: 0 0 0 2px rgba(217, 119, 6, 0.3);
}

/* Fix white text issues - ensure all text is readable */
.case-content,
.case-id,
.case-stats,
.case-stat,
.eruption-label,
.problem-badge,
.stats-table td,
.metric-section,
.section-card {
    color: #1e293b !important;
}

.case-id {
    color: #1e293b !important;
    font-weight: 600;
}

/* Ensure proper text colors in tables and sections */
table,
table th,
table td,
.info-value,
.info-label,
h2, h3, h4,
p, span, div {
    color: inherit;
}

/* Override any white text */
.section-card *,
.metric-section *,
.case-card * {
    color: #1e293b;
}

/* Specific fixes for problematic areas */
.dental-chart-container,
.teeth-row,
.quadrant-label {
    color: #475569 !important;
}

/* Ensure Export Button is Visible and Styled */
.export-data-btn,
#export-data-btn {
    display: inline-flex !important;
    align-items: center;
    gap: 8px;
    background: linear-gradient(135deg, #9370DB, #7c3aed) !important;
    color: white !important;
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px rgba(147, 112, 219, 0.3);
}

.export-data-btn:hover,
#export-data-btn:hover {
    background: linear-gradient(135deg, #7c3aed, #6d28d9) !important;
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(147, 112, 219, 0.4);
}

.export-btn-icon {
    font-size: 16px;
}

.export-btn-text {
    font-weight: 600;
}

.view-controls {
    display: flex !important;
    gap: 12px;
    align-items: center;
    flex-wrap: wrap;
}

/* Fix clickable hints and indicators visibility - override broad color rules */
.click-hint {
    color: #64748b !important;
    background: #f8fafc !important;
    padding: 4px 8px !important;
    border-radius: 4px !important;
    display: inline-block !important;
    margin-top: 4px !important;
}

.analysis-data-indicator {
    color: #059669 !important;
    background: rgba(16, 185, 129, 0.1) !important;
    padding: 4px 8px !important;
    border-radius: 4px !important;
    display: inline-block !important;
    margin-top: 4px !important;
}

.problem-details {
    color: #475569 !important;
    font-size: 12px !important;
}

.clickable-finding {
    cursor: pointer !important;
    transition: all 0.2s ease !important;
}

.clickable-finding:hover {
    background: #f8fafc !important;
    transform: translateX(2px) !important;
}
