/* Global Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Roboto', sans-serif;
    margin: 0;
    background: linear-gradient(135deg, #dae9f8 0%, #eef6ff 48%, #d9e7ff 100%);
    color: #1e2a38;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
    padding-bottom: 80px;
}

/* Brand Header */
.brand-header {
    margin-top: 25px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 20px 35px;
    background: rgba(255,255,255,0.45);
    backdrop-filter: blur(12px);
    border-radius: 20px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
    border: 1px solid rgba(255,255,255,0.4);
}

.brand-logo {
    width: 65px;
    height: 65px;
    background: url('/static/images/tanasa_logo.png') center/contain no-repeat;
    border: none;
}

.brand-name {
    font-size: 1.8rem;
    font-weight: 900;
    letter-spacing: 1.5px;
    background: linear-gradient(90deg, #0d47a1, #42a5f5);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0px 0px 18px rgba(13, 71, 161, 0.2);
}

h1 {
    margin: 25px 0 20px 0;
    font-weight: 900;
    font-size: 3rem;
    text-align: center;
    letter-spacing: 2px;
    background: linear-gradient(90deg, #0d47a1, #42a5f5);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    filter: drop-shadow(0 5px 10px rgba(0,0,0,0.15));
}

/* Upload Form */
.upload-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
    background: rgba(255, 255, 255, 0.35);
    backdrop-filter: blur(18px);
    padding: 25px 40px;
    border-radius: 25px;
    border: 1px solid rgba(255,255,255,0.3);
    box-shadow: 0 15px 45px rgba(0,0,0,0.12);
    margin-top: 25px;
    align-items: center;
    width: 100%;
    max-width: 900px;
}

.form-row {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    justify-content: center;
}

input[type="file"] {
    display: none;
}

.custom-file-upload,
.load-examples-btn,
.predict-btn {
    padding: 12px 25px;
    border-radius: 12px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    border: none;
    font-size: 1rem;
}

.custom-file-upload {
    border: 2px solid rgba(100, 181, 246, 0.9);
    background: linear-gradient(120deg, #bbdefb, #e3f2fd);
    color: #0d47a1;
    box-shadow: 0 5px 15px rgba(33,150,243,0.25);
    position: relative;
}

.custom-file-upload:hover {
    background: #90caf9;
    transform: translateY(-3px);
}

.custom-file-upload.drag-over {
    background: linear-gradient(120deg, #64b5f6, #90caf9);
    border-color: #0d47a1;
    transform: scale(1.05);
    box-shadow: 0 8px 25px rgba(33,150,243,0.4);
}

.load-examples-btn {
    background: linear-gradient(120deg, #42a5f5, #64b5f6);
    color: white;
    box-shadow: 0 5px 15px rgba(66, 165, 245, 0.4);
}

.load-examples-btn:hover:not(:disabled) {
    background: linear-gradient(120deg, #1e88e5, #42a5f5);
    transform: translateY(-3px);
}

.predict-btn {
    background: linear-gradient(120deg, #9e9e9e, #bdbdbd);
    color: white;
    box-shadow: 0 5px 15px rgba(158, 158, 158, 0.5);
}

.predict-btn.active {
    background: linear-gradient(120deg, #0d47a1, #1976d2);
    box-shadow: 0 5px 15px rgba(13, 71, 161, 0.5);
}

.predict-btn.active:hover:not(:disabled) {
    background: linear-gradient(120deg, #1976d2, #42a5f5);
    transform: translateY(-3px);
}

.predict-btn:disabled,
.load-examples-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* Status Box */
.status-box {
    margin-top: 5px;
    font-size: 0.95rem;
    font-weight: 600;
    color: #0d47a1;
    text-align: center;
    min-height: 20px;
}

.status-loading { color: #f57c00; }
.status-success { color: #2e7d32; }
.status-error { color: #c62828; }

/* Progress Bar */
.progress-container {
    width: 100%;
    max-width: 400px;
    margin-top: 15px;
    display: none;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.progress-bar {
    width: 100%;
    height: 12px;
    background: #e0e0e0;
    border-radius: 6px;
    overflow: hidden;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.1);
}

.progress-bar-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #0d47a1, #42a5f5);
    transition: width 0.3s ease;
}

.progress-text {
    font-size: 0.9rem;
    color: #0d47a1;
    font-weight: 700;
}

/* Examples Container */
.examples-container {
    max-height: 250px;
    overflow-y: auto;
    width: 100%;
    max-width: 500px;
    margin-top: 10px;
    display: none;
}

.example-item {
    display: flex;
    align-items: center;
    padding: 10px;
    margin: 5px 0;
    background: rgba(255,255,255,0.3);
    border-radius: 8px;
    cursor: pointer;
    transition: 0.2s ease;
}

.example-item:hover {
    background: rgba(255,255,255,0.5);
    transform: scale(1.02);
}

.example-item img {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 6px;
    margin-right: 10px;
}

.example-item.selected {
    background: rgba(66, 165, 245, 0.3);
    border: 2px solid #42a5f5;
}

/* Results Section */
.results-section {
    display: none;
    flex-direction: column;
    align-items: center;
    gap: 30px;
    margin-top: 40px;
    width: 100%;
}

.images {
    display: flex;
    gap: 30px;
    flex-wrap: wrap;
    justify-content: center;
    width: 100%;
}

.card {
    background: rgba(255,255,255,0.55);
    backdrop-filter: blur(14px);
    padding: 25px;
    border-radius: 25px;
    border: 1px solid rgba(255,255,255,0.4);
    box-shadow: 0 15px 40px rgba(0,0,0,0.15);
    max-width: 350px;
    text-align: center;
    transition: transform 0.3s ease;
}

.card:hover {
    transform: translateY(-5px);
}

.card h3 {
    margin-bottom: 15px;
    color: #0d47a1;
    font-size: 1.2rem;
}

.card img {
    border-radius: 15px;
    max-width: 100%;
    height: auto;
    border: 2px solid #64b5f6;
}

/* Feedback Section */
.feedback-section {
    display: none;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    padding: 20px 40px;
    background: rgba(255,255,255,0.45);
    backdrop-filter: blur(12px);
    border-radius: 20px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
    max-width: 500px;
    width: 100%;
}

.feedback-question {
    font-size: 1.1rem;
    font-weight: 600;
    color: #0d47a1;
    margin-bottom: 5px;
}

.feedback-buttons {
    display: flex;
    gap: 20px;
}

.feedback-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 15px 30px;
    border: none;
    border-radius: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    background: rgba(255,255,255,0.8);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.feedback-btn:hover:not(:disabled) {
    transform: translateY(-3px);
    box-shadow: 0 6px 18px rgba(0,0,0,0.15);
}

.feedback-btn.selected {
    transform: scale(1.05);
}

.feedback-icon {
    font-size: 2rem;
}

.feedback-text {
    font-size: 0.9rem;
    color: #1e2a38;
}

.like-btn.selected {
    background: linear-gradient(120deg, #4caf50, #66bb6a);
    color: white;
}

.like-btn.selected .feedback-text {
    color: white;
}

.dislike-btn.selected {
    background: linear-gradient(120deg, #f44336, #e57373);
    color: white;
}

.dislike-btn.selected .feedback-text {
    color: white;
}

.feedback-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.feedback-message {
    font-size: 0.9rem;
    color: #2e7d32;
    font-weight: 600;
    min-height: 20px;
}

/* Generate Report Button */
.report-action {
    display: none;
}

.generate-report-btn {
    padding: 15px 40px;
    background: linear-gradient(120deg, #0d47a1, #1976d2);
    color: white;
    border: none;
    border-radius: 15px;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 6px 20px rgba(13, 71, 161, 0.4);
    transition: all 0.3s ease;
}

.generate-report-btn:hover {
    background: linear-gradient(120deg, #1976d2, #42a5f5);
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(13, 71, 161, 0.5);
}

/* Report Loading Animation Overlay */
.report-loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.report-loading-overlay.active {
    opacity: 1;
}

.report-loading-content {
    background: linear-gradient(135deg, rgba(255,255,255,0.95) 0%, rgba(238,246,255,0.95) 100%);
    padding: 50px 60px;
    border-radius: 30px;
    text-align: center;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    border: 2px solid rgba(66, 165, 245, 0.3);
    min-width: 400px;
    animation: slideIn 0.4s ease-out;
}

@keyframes slideIn {
    from {
        transform: translateY(-30px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Spinner Animation */
.report-loading-spinner {
    width: 120px;
    height: 120px;
    position: relative;
    margin: 0 auto 30px;
}

.spinner-ring {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 4px solid transparent;
    animation: spin 1.5s cubic-bezier(0.5, 0, 0.5, 1) infinite;
}

.spinner-ring:nth-child(1) {
    border-top-color: #0d47a1;
    animation-delay: -0.45s;
}

.spinner-ring:nth-child(2) {
    border-top-color: #1976d2;
    animation-delay: -0.3s;
}

.spinner-ring:nth-child(3) {
    border-top-color: #42a5f5;
    animation-delay: -0.15s;
}

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

/* Loading Text */
.report-loading-text {
    font-size: 1.6rem;
    font-weight: 700;
    color: #0d47a1;
    margin-bottom: 15px;
    background: linear-gradient(90deg, #0d47a1, #42a5f5);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.report-loading-subtext {
    font-size: 1rem;
    color: #1976d2;
    margin-bottom: 25px;
    font-weight: 500;
}

/* Loading Progress Dots */
.report-loading-progress {
    display: flex;
    justify-content: center;
    gap: 10px;
}

.loading-dot {
    width: 12px;
    height: 12px;
    background: linear-gradient(135deg, #0d47a1, #42a5f5);
    border-radius: 50%;
    animation: bounce 1.4s infinite ease-in-out;
}

.loading-dot:nth-child(1) {
    animation-delay: -0.32s;
}

.loading-dot:nth-child(2) {
    animation-delay: -0.16s;
}

@keyframes bounce {
    0%, 80%, 100% {
        transform: scale(0);
        opacity: 0.5;
    }
    40% {
        transform: scale(1);
        opacity: 1;
    }
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.6);
    backdrop-filter: blur(5px);
}

.modal-content {
    background: linear-gradient(135deg, #ffffff 0%, #f5f9ff 100%);
    margin: 3% auto;
    padding: 30px;
    border: none;
    border-radius: 20px;
    width: 90%;
    max-width: 800px;
    max-height: 85vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    position: relative;
}

.close-btn {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.2s;
}

.close-btn:hover {
    color: #0d47a1;
}

.modal-content h2 {
    color: #0d47a1;
    margin-bottom: 20px;
    font-size: 1.8rem;
}

.modal-content h3 {
    color: #1976d2;
    margin: 25px 0 15px 0;
    font-size: 1.4rem;
}

.modal-content h4 {
    color: #42a5f5;
    margin: 15px 0 10px 0;
    font-size: 1.1rem;
}

/* Form Styles */
.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
}

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

.form-group.full-width {
    grid-column: 1 / -1;
}

.form-group label {
    font-weight: 600;
    color: #0d47a1;
    font-size: 0.9rem;
}

.form-group input,
.form-group select,
.form-group textarea {
    padding: 10px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1rem;
    font-family: 'Roboto', sans-serif;
    transition: border-color 0.2s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #42a5f5;
}

.lesion-group {
    background: rgba(66, 165, 245, 0.1);
    padding: 20px;
    border-radius: 12px;
    margin-bottom: 15px;
    border: 1px solid rgba(66, 165, 245, 0.3);
}

.add-lesion-btn {
    padding: 10px 20px;
    background: rgba(66, 165, 245, 0.2);
    color: #0d47a1;
    border: 2px dashed #42a5f5;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-bottom: 20px;
    width: 100%;
}

.add-lesion-btn:hover {
    background: rgba(66, 165, 245, 0.3);
    transform: translateY(-2px);
}

.modal-actions {
    display: flex;
    gap: 15px;
    justify-content: flex-end;
    margin-top: 25px;
}

.btn-primary,
.btn-secondary {
    padding: 12px 30px;
    border: none;
    border-radius: 10px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1rem;
}

.btn-primary {
    background: linear-gradient(120deg, #0d47a1, #1976d2);
    color: white;
    box-shadow: 0 4px 15px rgba(13, 71, 161, 0.3);
}

.btn-primary:hover:not(:disabled) {
    background: linear-gradient(120deg, #1976d2, #42a5f5);
    transform: translateY(-2px);
}

.btn-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.btn-secondary {
    background: #e0e0e0;
    color: #1e2a38;
}

.btn-secondary:hover {
    background: #bdbdbd;
}

.report-status {
    margin-top: 15px;
    text-align: center;
    font-weight: 600;
    min-height: 20px;
}

/* ========== REPORT DISPLAY MODAL ========== */
.report-display-modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.7);
    backdrop-filter: blur(8px);
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.report-display-content {
    background: linear-gradient(135deg, #ffffff 0%, #f8fbff 100%);
    margin: 2% auto;
    padding: 0;
    border: none;
    border-radius: 20px;
    width: 95%;
    max-width: 1000px;
    max-height: 90vh;
    overflow: hidden;
    box-shadow: 0 25px 70px rgba(0,0,0,0.4);
    position: relative;
    animation: slideInDown 0.4s ease-out;
}

@keyframes slideInDown {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.report-display-header {
    background: linear-gradient(135deg, #0d47a1 0%, #1976d2 100%);
    padding: 25px 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-radius: 20px 20px 0 0;
}

.report-display-title {
    color: white;
    font-size: 1.8rem;
    font-weight: 700;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 12px;
}

.report-display-title::before {
    content: "📋";
    font-size: 2rem;
}

.report-close-btn {
    background: rgba(255,255,255,0.2);
    color: white;
    border: 2px solid rgba(255,255,255,0.3);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 24px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    line-height: 1;
}

.report-close-btn:hover {
    background: rgba(255,255,255,0.3);
    transform: rotate(90deg);
}

.report-display-body {
    padding: 40px;
    max-height: calc(90vh - 200px);
    overflow-y: auto;
}

/* Report Content Styles */
.report-content {
    font-family: 'Roboto', sans-serif;
    color: #1e2a38;
    line-height: 1.8;
}

.report-section {
    margin-bottom: 30px;
    padding: 25px;
    background: rgba(255,255,255,0.6);
    border-radius: 15px;
    border-left: 4px solid #42a5f5;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

.report-section-title {
    color: #0d47a1;
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid rgba(66, 165, 245, 0.3);
}

.report-subsection-title {
    color: #1976d2;
    font-size: 1.15rem;
    font-weight: 600;
    margin: 20px 0 10px 0;
}

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

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

.report-label {
    color: #5c6bc0;
    font-weight: 600;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.report-value {
    color: #1e2a38;
    font-size: 1.05rem;
    font-weight: 500;
}

.report-text {
    color: #37474f;
    font-size: 1.05rem;
    line-height: 1.8;
    margin: 10px 0;
}

.report-text strong {
    color: #0d47a1;
    font-weight: 600;
}

/* Lesion Card */
.lesion-card {
    background: linear-gradient(135deg, rgba(227, 242, 253, 0.4) 0%, rgba(255, 255, 255, 0.6) 100%);
    border: 2px solid rgba(66, 165, 245, 0.3);
    border-radius: 12px;
    padding: 20px;
    margin: 15px 0;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

.lesion-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 12px;
    border-bottom: 2px solid rgba(66, 165, 245, 0.2);
}

.lesion-title {
    color: #1976d2;
    font-size: 1.2rem;
    font-weight: 700;
}

.lesion-birads {
    background: linear-gradient(120deg, #0d47a1, #1976d2);
    color: white;
    padding: 6px 16px;
    border-radius: 20px;
    font-weight: 700;
    font-size: 1rem;
    box-shadow: 0 3px 10px rgba(13, 71, 161, 0.3);
}

.lesion-details {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 12px;
    margin-top: 15px;
}

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

.lesion-detail-label {
    color: #5c6bc0;
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
}

.lesion-detail-value {
    color: #1e2a38;
    font-size: 1rem;
    font-weight: 500;
}

/* Diagnosis Section */
.diagnosis-section {
    background: linear-gradient(135deg, rgba(255, 243, 224, 0.3) 0%, rgba(255, 255, 255, 0.5) 100%);
    border-left-color: #ff9800;
}

.diagnosis-list {
    list-style: none;
    padding: 0;
    margin: 10px 0;
}

.diagnosis-list li {
    padding: 8px 0;
    padding-left: 25px;
    position: relative;
    color: #37474f;
    font-size: 1.05rem;
}

.diagnosis-list li::before {
    content: "•";
    position: absolute;
    left: 8px;
    color: #ff9800;
    font-size: 1.5rem;
    line-height: 1;
}

/* Impression Section */
.impression-section {
    background: linear-gradient(135deg, rgba(232, 245, 233, 0.4) 0%, rgba(255, 255, 255, 0.6) 100%);
    border-left-color: #4caf50;
}

.overall-birads {
    display: inline-block;
    background: linear-gradient(120deg, #2e7d32, #4caf50);
    color: white;
    padding: 10px 20px;
    border-radius: 25px;
    font-weight: 700;
    font-size: 1.2rem;
    margin: 10px 0;
    box-shadow: 0 4px 15px rgba(46, 125, 50, 0.3);
}

.management-recommendation {
    background: rgba(255,255,255,0.7);
    padding: 15px;
    border-radius: 10px;
    margin-top: 15px;
    border: 2px solid rgba(76, 175, 80, 0.3);
}

/* AI Metadata Section */
.ai-metadata-section {
    background: linear-gradient(135deg, rgba(237, 231, 246, 0.3) 0%, rgba(255, 255, 255, 0.5) 100%);
    border-left-color: #9c27b0;
}

.confidence-badge {
    display: inline-block;
    background: linear-gradient(120deg, #7b1fa2, #9c27b0);
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-weight: 700;
    margin: 5px 0;
}

/* Report Actions */
.report-display-footer {
    padding: 20px 40px;
    background: rgba(245, 249, 255, 0.8);
    border-top: 2px solid rgba(66, 165, 245, 0.2);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
}

.report-action-btn {
    padding: 12px 30px;
    border: none;
    border-radius: 12px;
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 10px;
}

.btn-download {
    background: linear-gradient(120deg, #0d47a1, #1976d2);
    color: white;
    box-shadow: 0 4px 15px rgba(13, 71, 161, 0.3);
}

.btn-download:hover {
    background: linear-gradient(120deg, #1976d2, #42a5f5);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(13, 71, 161, 0.4);
}

.btn-print {
    background: linear-gradient(120deg, #5c6bc0, #7986cb);
    color: white;
    box-shadow: 0 4px 15px rgba(92, 107, 192, 0.3);
}

.btn-print:hover {
    background: linear-gradient(120deg, #7986cb, #9fa8da);
    transform: translateY(-2px);
}

.btn-close-report {
    background: #e0e0e0;
    color: #1e2a38;
}

.btn-close-report:hover {
    background: #bdbdbd;
}

/* Print Styles */
@media print {
    /* Hide everything except the report modal */
    body > *:not(.report-display-modal) {
        display: none !important;
    }
    
    /* Hide modal background and non-content elements */
    .report-display-modal {
        position: static !important;
        background: white !important;
        backdrop-filter: none !important;
        width: 100% !important;
        height: auto !important;
    }
    
    .report-display-header {
        background: white !important;
        border-bottom: 3px solid #0d47a1 !important;
        padding: 20px 0 !important;
        page-break-after: avoid;
    }
    
    .report-display-title {
        color: #0d47a1 !important;
    }
    
    .report-display-footer,
    .report-close-btn {
        display: none !important;
    }
    
    .report-display-content {
        box-shadow: none !important;
        border-radius: 0 !important;
        margin: 0 !important;
        max-height: none !important;
        width: 100% !important;
        background: white !important;
    }
    
    .report-display-body {
        padding: 20px 0 !important;
        max-height: none !important;
        overflow: visible !important;
    }
    
    /* Optimize report sections for printing */
    .report-section {
        page-break-inside: avoid;
        background: white !important;
        border: 1px solid #e0e0e0 !important;
        margin-bottom: 15px !important;
    }
    
    .lesion-card {
        page-break-inside: avoid;
        background: white !important;
        border: 1px solid #e0e0e0 !important;
    }
    
    /* Ensure colors print correctly */
    .lesion-birads,
    .overall-birads,
    .confidence-badge {
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
        color-adjust: exact !important;
    }
    
    /* Adjust font sizes for print */
    .report-section-title {
        font-size: 1.2rem !important;
    }
    
    .report-text,
    .report-value {
        font-size: 0.95rem !important;
    }
    
    /* Remove shadows and effects */
    * {
        box-shadow: none !important;
        text-shadow: none !important;
    }
}

/* Additional support for print preparation */
body.printing-report > *:not(.report-display-modal) {
    visibility: hidden;
}

body.printing-report .report-display-modal {
    visibility: visible;
}

/* Footer */
footer {
    margin-top: 60px;
    color: #0d47a1;
    text-align: center;
    font-size: 1rem;
    font-weight: 600;
    opacity: 0.8;
}

/* Responsive Design */
@media (max-width: 768px) {
    h1 {
        font-size: 2rem;
    }
    
    .brand-name {
        font-size: 1.4rem;
    }
    
    .upload-form {
        padding: 20px;
    }
    
    .form-row {
        flex-direction: column;
        width: 100%;
    }
    
    .custom-file-upload,
    .load-examples-btn,
    .predict-btn {
        width: 100%;
    }
    
    .images {
        flex-direction: column;
        align-items: center;
    }
    
    .card {
        max-width: 100%;
    }
    
    .feedback-buttons {
        flex-direction: column;
        width: 100%;
    }
    
    .feedback-btn {
        width: 100%;
    }
    
    .modal-content {
        width: 95%;
        margin: 5% auto;
        padding: 20px;
    }
    
    .form-grid {
        grid-template-columns: 1fr;
    }
    
    .report-loading-content {
        min-width: auto;
        width: 90%;
        padding: 40px 30px;
    }
    
    .report-loading-text {
        font-size: 1.3rem;
    }
    
    .report-loading-subtext {
        font-size: 0.9rem;
    }
    
    .report-display-content {
        width: 98%;
        margin: 1% auto;
        max-height: 95vh;
    }
    
    .report-display-header {
        padding: 20px 25px;
    }
    
    .report-display-title {
        font-size: 1.4rem;
    }
    
    .report-display-body {
        padding: 25px;
    }
    
    .report-section {
        padding: 20px;
    }
    
    .report-info-grid,
    .lesion-details {
        grid-template-columns: 1fr;
    }
    
    .report-display-footer {
        flex-direction: column;
        padding: 15px 25px;
    }
    
    .report-action-btn {
        width: 100%;
        justify-content: center;
    }
}
/* ==================== BIRADS BADGE STYLES ==================== */

/* Base badge style */
.birads-badge {
    display: inline-block;
    padding: 8px 18px;
    border-radius: 20px;
    font-weight: 700;
    font-size: 1rem;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.2);
    color: white;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* B2 - Benign (Green) */
.birads-b2 {
    background: linear-gradient(120deg, #2e7d32, #4caf50);
}

/* B3 - Probably Benign (Light Green/Yellow) */
.birads-b3 {
    background: linear-gradient(120deg, #689f38, #8bc34a);
}

/* B4 - Suspicious (Orange) */
.birads-b4 {
    background: linear-gradient(120deg, #ef6c00, #ff9800);
}

/* B5 - Highly Suspicious (Red) */
.birads-b5 {
    background: linear-gradient(120deg, #c62828, #e53935);
}

/* B6 - Known Malignancy (Dark Red) */
.birads-b6 {
    background: linear-gradient(120deg, #b71c1c, #c62828);
}

/* Overall BI-RADS badge (larger) */
.overall-birads {
    display: inline-block;
    padding: 12px 24px;
    border-radius: 25px;
    font-weight: 700;
    font-size: 1.3rem;
    margin: 10px 0;
    color: white;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.birads-b2-overall {
    background: linear-gradient(120deg, #2e7d32, #4caf50);
    box-shadow: 0 4px 15px rgba(46, 125, 50, 0.4);
}

.birads-b3-overall {
    background: linear-gradient(120deg, #689f38, #8bc34a);
    box-shadow: 0 4px 15px rgba(104, 159, 56, 0.4);
}

.birads-b4-overall {
    background: linear-gradient(120deg, #ef6c00, #ff9800);
    box-shadow: 0 4px 15px rgba(239, 108, 0, 0.4);
}

.birads-b5-overall {
    background: linear-gradient(120deg, #c62828, #e53935);
    box-shadow: 0 4px 15px rgba(198, 40, 40, 0.4);
}

.birads-b6-overall {
    background: linear-gradient(120deg, #b71c1c, #c62828);
    box-shadow: 0 4px 15px rgba(183, 28, 28, 0.4);
}

/* Confidence badges */
.confidence-badge {
    display: inline-block;
    padding: 8px 16px;
    border-radius: 20px;
    font-weight: 700;
    color: white;
    margin: 5px 0;
}

.confidence-high {
    background: linear-gradient(120deg, #2e7d32, #4caf50);
    box-shadow: 0 3px 10px rgba(46, 125, 50, 0.3);
}

.confidence-medium {
    background: linear-gradient(120deg, #ef6c00, #ff9800);
    box-shadow: 0 3px 10px rgba(239, 108, 0, 0.3);
}

.confidence-low {
    background: linear-gradient(120deg, #c62828, #e53935);
    box-shadow: 0 3px 10px rgba(198, 40, 40, 0.3);
}

/* Diagnosis list styling */
.diagnosis-list {
    list-style: none;
    padding: 0;
    margin: 10px 0;
}

.diagnosis-list li {
    padding: 10px 0;
    padding-left: 30px;
    position: relative;
    color: #37474f;
    font-size: 1.05rem;
    line-height: 1.6;
}

.diagnosis-list li::before {
    content: "•";
    position: absolute;
    left: 10px;
    color: #ff9800;
    font-size: 1.5rem;
    line-height: 1.2;
    font-weight: bold;
}

/* Management recommendation box */
.management-recommendation {
    background: linear-gradient(135deg, rgba(232, 245, 233, 0.5) 0%, rgba(255, 255, 255, 0.7) 100%);
    padding: 20px;
    border-radius: 12px;
    margin-top: 20px;
    border: 2px solid rgba(76, 175, 80, 0.3);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

/* Print-friendly adjustments */
@media print {
    .birads-badge,
    .overall-birads,
    .confidence-badge {
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
        color-adjust: exact !important;
    }
    
    .lesion-card {
        page-break-inside: avoid;
    }
    
    .report-section {
        page-break-inside: avoid;
    }
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .birads-badge {
        padding: 6px 14px;
        font-size: 0.9rem;
    }
    
    .overall-birads {
        padding: 10px 20px;
        font-size: 1.1rem;
    }
    
    .diagnosis-list li {
        padding-left: 25px;
        font-size: 1rem;
    }
}