/* === Case Nurse - Master Stylesheet v4.0 (Pixel-Perfect) === */

/* --- 1. CSS Reset & Base Styles --- */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}
body {
    font-family: 'Inter', sans-serif;
    background-color: #f8fafc; /* Fallback */
    background-image: linear-gradient(to bottom right, #f8fafc, #eff6ff, #eef2ff);
    color: #0f172a; /* text-slate-900 */
}

/* --- 2. Layout --- */
.login-container {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 1rem;
}
.login-wrapper {
    width: 100%;
    max-width: 28rem; /* max-w-md */
}

/* --- 3. Card Component --- */
.card {
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-radius: 0.75rem; /* rounded-xl */
    box-shadow: 0 20px 25px -5px rgba(0,0,0,0.1), 0 10px 10px -5px rgba(0,0,0,0.04);
    border: 1px solid #f1f5f9;
}
.card-header {
    text-align: center;
    padding: 2rem;
}
.card-header h1 {
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: -0.025em;
    color: #1e293b;
    margin-bottom: 0.5rem;
}
.card-header p {
    font-size: 0.875rem;
    color: #475569;
    margin: 0;
}
.card-content {
    padding: 0 2rem 2rem;
}

/* --- 4. Form & Spacing Utilities --- */
/* This mimics Tailwind's space-y-* utility for consistent spacing */
.space-y-6 > *:not(:first-child) {
    margin-top: 1.5rem;
}
.space-y-2 > *:not(:first-child) {
    margin-top: 0.5rem;
}
.form-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    font-weight: 600;
    color: #334155;
}
.form-label .required { color: #ef4444; }
.form-input-wrapper { position: relative; }
.form-input {
    height: 3rem;
    width: 100%;
    border: 1px solid #e2e8f0;
    border-radius: 0.375rem;
    padding: 0.5rem 0.75rem; /* This fixes the "spill over" */
    transition: all 0.2s ease-in-out;
}
.form-input.has-icon { padding-right: 3rem; }
.form-input:focus {
    outline: none;
    border-color: #14b8a6;
    box-shadow: 0 0 0 2px rgba(20, 184, 166, 0.2);
}

/* --- 5. Form Extras (Checkbox, Links) --- */
.form-extras {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.875rem;
}
.checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    color: #475569;
}
input[type="checkbox"] {
    width: 1rem;
    height: 1rem;
    border-radius: 0.25rem;
    border: 1px solid #94a3b8;
    color: #0d9488;
    accent-color: #0d9488;
}
input[type="checkbox"]:focus {
    box-shadow: 0 0 0 2px rgba(20, 184, 166, 0.2);
    outline: none;
}
.link {
    color: #0d9488;
    font-weight: 500;
    text-decoration: none;
    transition: color 0.2s;
}
.link:hover { color: #0f766e; }

/* --- 6. Button --- */
.btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
    height: 3rem;
    font-weight: 600;
    font-size: 1rem;
    border-radius: 0.375rem;
    border: none;
    cursor: pointer;
    background-color: #0d9488;
    color: white;
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -1px rgba(0,0,0,0.06);
    transition: all 0.2s ease-in-out;
}
.btn-primary:hover {
    background-color: #0f766e;
    box-shadow: 0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -2px rgba(0,0,0,0.05);
}

/* --- 7. Icons & Trust Indicators --- */
.icon { stroke-width: 2; }
.password-toggle {
    position: absolute;
    right: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    color: #94a3b8;
    transition: color 0.2s;
    padding: 0;
}
.password-toggle:hover { color: #475569; }
.trust-badge-top {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: #475569;
    margin-bottom: 1.5rem;
}
.trust-badge-top .icon {
    width: 1rem; height: 1rem;
    color: #0d9488;
}
.trust-badge-bottom {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-size: 0.75rem; /* text-xs */
    color: #64748b; /* text-slate-500 */
    padding-top: 1.5rem;
    margin-top: 2rem;
    border-top: 1px solid #f1f5f9;
}
.trust-badge-bottom .icon {
    width: 0.75rem; height: 0.75rem;
}

/* --- 8. Footer --- */
.footer-text {
    text-align: center;
    margin-top: 1.5rem;
    font-size: 0.75rem;
    color: #64748b;
}
.footer-text .link:hover { text-decoration: underline; }

/* --- Dashboard Layout & Header --- */
.dashboard-header {
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    border-bottom: 1px solid rgba(226, 232, 240, 0.6); /* slate-200/60 */
    position: sticky;
    top: 0;
    z-index: 50;
}
.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 4rem; /* h-16 */
    max-width: 80rem; /* max-w-7xl */
    margin: 0 auto;
    padding: 0 1.5rem; /* px-6 */
}
.header-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.25rem; /* text-xl */
    font-weight: 700;
    color: #0f172a; /* text-slate-900 */
    letter-spacing: -0.025em; /* tracking-tight */
}
.user-info {
    display: flex;
    align-items: center;
    gap: 1rem; /* space-x-4 */
    font-size: 0.875rem;
    color: #4b5563;
}
.user-info-text {
    display: none; /* Hidden on small screens */
}
@media (min-width: 640px) { /* sm: */
    .user-info-text {
        display: flex;
        align-items: center;
        gap: 0.75rem;
    }
}

.btn-ghost {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.375rem 0.75rem;
    border-radius: 0.375rem;
    border: none;
    background-color: transparent;
    color: #4b5563; /* text-slate-600 */
    cursor: pointer;
    text-decoration: none;
    transition: background-color 0.2s, color 0.2s;
}
.btn-ghost:hover {
    background-color: rgba(241, 245, 249, 0.8); /* hover:bg-slate-100/80 */
    color: #0f172a; /* hover:text-slate-900 */
}

.dashboard-main {
    max-width: 80rem;
    margin: 0 auto;
    padding: 2rem 1.5rem;
}
.page-heading {
    margin-bottom: 2rem;
}
.page-heading h2 {
    font-size: 1.875rem; /* text-3xl */
    font-weight: 700;
    letter-spacing: -0.025em;
}

/* --- Document Card Grid & Styling --- */
.documents-grid {
    display: grid;
    grid-template-columns: repeat(1, 1fr);
    gap: 1.5rem;
}
@media (min-width: 768px) { /* md: */
    .documents-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 1280px) { /* xl: */
    .documents-grid { grid-template-columns: repeat(3, 1fr); }
}

.document-card {
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    border: 1px solid rgba(226, 232, 240, 0.6);
    box-shadow: 0 10px 15px -3px rgba(0,0,0,0.07), 0 4px 6px -2px rgba(0,0,0,0.05); /* shadow-lg */
    transition: all 0.2s ease-in-out;
    display: flex;
    flex-direction: column;
}
.document-card:hover {
    box-shadow: 0 20px 25px -5px rgba(0,0,0,0.1), 0 10px 10px -5px rgba(0,0,0,0.04); /* hover:shadow-xl */
    transform: translateY(-0.25rem);
}
.document-card .card-header {
    padding: 1rem 1rem 1rem;
}
.document-card .card-header h3 {
    font-weight: 600; /* font-semibold */
    font-size: 0.875rem;
    line-height: 1.25;
    color: #111827;
}
.document-card .card-content {
    padding: 0 1rem 1rem;
}
.document-card .card-content p {
    font-size: 0.75rem; /* text-xs */
    color: #6b7280;
    margin: 0;
}
.document-card .card-footer {
    padding: 0 1rem 1rem;
    margin-top: auto;
}
.document-card .btn-primary {
    height: 2.5rem;
    font-size: 0.875rem;
    text-decoration: none;
    box-shadow: 0 1px 2px 0 rgba(0,0,0,0.05);
}
.document-card .btn-primary:hover {
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -1px rgba(0,0,0,0.06);
}

/* --- Empty State --- */
.empty-state {
    grid-column: 1 / -1; /* Span all columns */
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 300px;
    padding: 2rem;
}
.empty-state-content {
    text-align: center;
    max-width: 400px;
}
.empty-state-icon {
    color: #9ca3af; /* text-gray-400 */
    margin: 0 auto 1rem;
    opacity: 0.7;
}
.empty-state h3 {
    font-size: 1.25rem; /* text-xl */
    font-weight: 600;
    color: #4b5563; /* text-gray-600 */
    margin-bottom: 0.5rem;
}
.empty-state p {
    font-size: 0.875rem; /* text-sm */
    color: #6b7280; /* text-gray-500 */
    line-height: 1.5;
}

/* --- Error Message --- */
.error-message {
    background-color: #fef2f2; /* bg-red-50 */
    border: 1px solid #fecaca; /* border-red-200 */
    border-radius: 0.5rem; /* rounded-lg */
    padding: 1rem;
    margin-bottom: 1.5rem;
}
.error-content {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}
.error-icon {
    color: #ef4444; /* text-red-500 */
    flex-shrink: 0;
}
.error-content p {
    color: #991b1b; /* text-red-800 */
    font-size: 0.875rem; /* text-sm */
    margin: 0;
}

/* --- Review Page Layout & Header --- */
.review-header {
    background-color: white;
    border-bottom: 1px solid #e5e7eb; /* border-gray-200 */
    padding: 1rem 1.5rem;
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05); /* shadow-sm */
}
.review-header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.file-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}
.file-info .icon {
    width: 1.5rem; height: 1.5rem;
    color: #0d9488; /* text-teal-600 */
}
.file-details h1 {
    font-size: 1.125rem; /* text-lg */
    font-weight: 600; /* font-semibold */
    color: #111827;
    margin: 0;
}
.file-details p {
    display: flex;
    align-items: center;
    font-size: 0.875rem; /* text-sm */
    color: #6b7280; /* text-gray-500 */
    margin-top: 0.25rem;
}
.file-details p .icon {
    width: 1rem; height: 1rem;
    margin-right: 0.25rem;
}
.review-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}
.review-progress {
    font-size: 0.875rem;
    color: #4b5563;
    font-weight: 400;
}
.review-actions .btn-primary {
    padding: 0.5rem 1.5rem;
    height: auto;
    width: auto;
}

/* --- Review Page Container --- */
.review-page-container {
    height: 100vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* --- Two-Panel Grid Layout --- */
.review-grid {
    display: grid;
    grid-template-columns: 1fr; /* Mobile first */
    gap: 1.5rem;
    padding: 1.5rem;
    flex: 1;
    overflow: hidden;
}
@media (min-width: 1024px) { /* lg: */
    /* 1/3 for left panel, 2/3 for right panel */
    .review-grid { grid-template-columns: repeat(12, 1fr); }
    .findings-panel { grid-column: span 4; }
    .pdf-panel { grid-column: span 8; }
}

/* --- Panel Styling --- */
.panel {
    background-color: white;
    border-radius: 0.5rem; /* rounded-lg */
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    height: 100%;
}
.panel-header {
    padding: 1rem;
    border-bottom: 1px solid #f3f4f6; /* border-b */
    background-color: #f9fafb; /* bg-gray-50 */
    border-top-left-radius: 0.5rem;
    border-top-right-radius: 0.5rem;
}
.panel-header h2 {
    font-size: 1.125rem; /* text-lg */
    font-weight: 600;
    color: #111827;
    margin: 0;
}
.panel-header p {
    font-size: 0.875rem;
    color: #4b5563;
    margin-top: 0.25rem;
}
.panel-content {
    padding: 1.5rem;
    flex: 1;
    min-height: 0; /* Important for flex child to be able to shrink */
}
.panel-content.scrollable {
    overflow-y: auto;
}

/* --- PDF Viewer --- */
.pdf-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    background-color: #f9fafb; /* bg-gray-100 */
    border: 2px dashed #d1d5db; /* border-gray-300 */
    border-radius: 0.375rem;
    text-align: center;
    color: #6b7280;
}
.pdf-placeholder .icon {
    width: 3rem; height: 3rem;
    color: #9ca3af; /* text-gray-400 */
    margin-bottom: 1rem;
}
.pdf-placeholder h3 {
    font-size: 1.125rem;
    font-weight: 500;
    color: #4b5563;
    margin: 0;
}

#pdf-viewer-container {
    height: 100%;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}
#pdf-viewer-container canvas {
    display: block;
    margin: 0 auto 1rem auto;
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -2px rgba(0,0,0,0.1);
    max-width: 100%;
    height: auto;
}


/* --- Attorney Dashboard Layout & Header --- */
.attorney-header {
    background-color: white;
    border-bottom: 1px solid #e5e7eb; /* border-gray-200 */
    padding: 1.5rem; /* px-6 py-6 */
}
.attorney-header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.attorney-header-title {
    display: flex;
    align-items: center;
    gap: 1rem;
}
.attorney-header-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem; /* w-10 */
    height: 2.5rem; /* h-10 */
    background-color: #0d9488; /* bg-teal-600 */
    border-radius: 0.5rem; /* rounded-lg */
}
.attorney-header-logo .icon {
    width: 1.5rem; height: 1.5rem;
    color: white;
}
.attorney-header-content h1 {
    font-size: 1.5rem; /* text-2xl */
    letter-spacing: -0.025em;
    margin: 0;
}
.btn-outline {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border: 1px solid #d1d5db;
    border-radius: 0.375rem;
    background-color: transparent;
    color: #374151;
    cursor: pointer;
    text-decoration: none;
    transition: background-color 0.2s;
}
.btn-outline:hover {
    background-color: #f9fafb; /* bg-gray-50 */
}

/* --- Main Content Area --- */
.attorney-main {
    padding: 2rem 1.5rem;
}

/* --- Upload Area --- */
.upload-card {
    background-color: white;
    border: 1px solid #e5e7eb;
    border-radius: 0.5rem;
    padding: 2rem;
    margin-bottom: 2rem;
}
.upload-card-header {
    text-align: center;
    margin-bottom: 1.5rem;
}
.upload-card-header h2 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}
.upload-card-header p {
    color: #4b5563;
    font-size: 0.875rem;
}
.drop-zone {
    border: 2px dashed #d1d5db; /* border-gray-300 */
    border-radius: 0.5rem;
    padding: 2rem;
    text-align: center;
    transition: all 0.2s;
}
.drop-zone.drag-over {
    border-color: #2dd4bf; /* border-teal-400 */
    background-color: #f0fdfa; /* bg-teal-50 */
}
.drop-zone .icon {
    width: 3rem; height: 3rem;
    color: #9ca3af; /* text-gray-400 */
    margin: 0 auto 1rem;
}
.drop-zone p {
    margin: 0;
    margin-top: 0.5rem;
}
.drop-zone .btn-primary {
    margin-top: 1rem;
    width: auto; /* override default 100% width */
}

/* --- Document List --- */
.document-list-header {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
}
.document-grid {
    display: grid;
    grid-template-columns: repeat(1, 1fr);
    gap: 1.5rem;
}
@media (min-width: 768px) { .document-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .document-grid { grid-template-columns: repeat(3, 1fr); } }

.doc-card {
    background-color: white;
    border-radius: 0.5rem;
    border: 1px solid #e5e7eb;
    box-shadow: 0 1px 2px 0 rgba(0,0,0,0.05); /* shadow-sm */
    transition: box-shadow 0.2s;
    display: flex;
    flex-direction: column;
}
.doc-card:hover {
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -2px rgba(0,0,0,0.1);
}
.doc-card-header {
    padding: 0.75rem 1rem;
    display: flex;
    gap: 0.75rem;
}
.doc-card-header .icon {
    width: 1.25rem; height: 1.25rem;
    color: #6b7280;
    margin-top: 0.25rem;
    flex-shrink: 0;
}
.doc-card-header h3 {
    font-weight: 700;
    font-size: 0.875rem;
    line-height: 1.4;
    word-break: break-word;
    margin-bottom: 0.25rem;
}
.doc-card-header p {
    font-size: 0.75rem;
    color: #6b7280;
    margin: 0;
}
.doc-card-content {
    padding: 0.75rem 1rem;
    border-top: 1px solid #f3f4f6;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.doc-card .btn-primary, .doc-card .btn-disabled {
    padding: 0.25rem 0.75rem;
    font-size: 0.875rem;
    height: auto;
    width: auto;
    font-weight: 500;
}
.btn-disabled {
    background-color: #f3f4f6;
    color: #9ca3af;
    cursor: not-allowed;
    box-shadow: none;
}

/* --- Report Viewer Layout --- */
.report-viewer-container {
    display: flex;
    flex-direction: column;
    height: 100vh;
    overflow: hidden;
}
.report-header {
    background-image: linear-gradient(to right, #f8fafc, white);
    border-bottom: 1px solid #e5e7eb;
    box-shadow: 0 1px 2px 0 rgba(0,0,0,0.05);
    padding: 1.25rem 1.5rem;
}
.report-header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.report-title {
    display: flex;
    align-items: center;
    gap: 1rem;
}
.report-title-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem;
    background-color: #ccfbf1; /* teal-100 */
    border-radius: 0.5rem; /* rounded-lg */
}
.report-title-icon .icon {
    width: 1.5rem; height: 1.5rem;
    color: #115e59; /* teal-700 */
}
.report-title-text h1 {
    font-size: 1.25rem;
    font-weight: 700;
    letter-spacing: -0.025em;
    margin: 0;
}
.report-title-text p {
    font-family: monospace;
    font-size: 0.875rem;
    color: #6b7280;
    margin-top: 0.25rem;
}

.report-body {
    display: flex;
    flex-grow: 1;
    height: calc(100vh - 89px); /* Full height minus header */
}

/* --- Left Panel (Findings) --- */
.findings-sidebar {
    width: 20rem; /* w-80 */
    background-color: #f9fafb; /* bg-gray-50 */
    border-right: 1px solid #e5e7eb;
    display: flex;
    flex-direction: column;
}
.findings-header, .findings-filters {
    padding: 1rem;
    border-bottom: 1px solid #e5e7eb;
    background-color: white;
}
.findings-header h2 {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.125rem;
    font-weight: 600;
}
.findings-header .icon {
    width: 1.25rem; height: 1.25rem;
    color: #0d9488;
}
.findings-filters-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
}
.btn-filter {
    font-size: 0.75rem; /* text-xs */
    padding: 0.25rem 0.75rem;
    border: 1px solid #d1d5db;
    color: #4b5563;
    background-color: transparent;
    border-radius: 0.375rem;
    cursor: pointer;
    transition: all 0.2s;
}
.btn-filter:hover { background-color: #f9fafb; }
.btn-filter.active {
    background-color: #0d9488;
    color: white;
    border-color: #0d9488;
}
.findings-list {
    flex-grow: 1;
    overflow-y: auto;
    padding: 1rem;
}
.findings-list > *:not(:first-child) { margin-top: 0.75rem; } /* space-y-3 */

.finding-card {
    cursor: pointer;
    transition: all 0.2s;
    border: 1px solid #e5e7eb;
    background-color: white;
}
.finding-card:hover {
    box-shadow: 0 1px 2px 0 rgba(0,0,0,0.05);
    border-color: #d1d5db;
}
.finding-card.active {
    border: 2px solid #14b8a6;
    box-shadow: 0 1px 2px 0 rgba(0,0,0,0.05);
}
.finding-card .card-content {
    padding: 0.75rem;
}
.finding-card p {
    font-size: 0.875rem;
    color: #111827;
    margin-bottom: 0.5rem;
}
.finding-card-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.finding-card-meta .page-ref {
    font-size: 0.75rem;
    color: #6b7280;
    font-weight: 500;
}

/* --- Right Panel (PDF Viewer) --- */
.pdf-viewer-main {
    flex-grow: 1;
    background-color: #f3f4f6; /* bg-gray-100 */
    padding: 1.5rem;
}
.pdf-viewer-container {
    height: 100%;
    background-color: white;
    border-radius: 0.5rem;
    box-shadow: inset 0 2px 4px 0 rgba(0,0,0,0.05);
    border: 1px solid #e5e7eb;
    display: flex;
    align-items: center;
    justify-content: center;
}
.pdf-viewer-placeholder {
    text-align: center;
    color: #6b7280;
}
.pdf-viewer-placeholder .icon {
    width: 4rem; height: 4rem; /* h-16 w-16 */
    margin: 0 auto 1rem;
    color: #d1d5db;
}
.pdf-viewer-placeholder h3 { font-size: 1.125rem; font-weight: 500; margin-bottom: 0.5rem; }
.pdf-viewer-placeholder p { font-size: 0.875rem; }
.pdf-viewer-placeholder .subtext { font-size: 0.75rem; color: #9ca3af; margin-top: 0.5rem; }

/* --- Nurse Review Finding Cards --- */
.finding-card {
    background-color: white;
    border: 1px solid #e5e7eb; /* border-gray-200 */
    border-radius: 0.5rem; /* rounded-lg */
    margin-bottom: 0.75rem;
    cursor: pointer;
    transition: all 0.2s ease-in-out;
}
.finding-card:hover {
    border-color: #d1d5db; /* border-gray-300 */
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
}
.finding-card.active {
    border: 2px solid #14b8a6; /* border-teal-500 */
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
}
.finding-card-content {
    padding: 0.75rem; /* p-3 */
}
.finding-text {
    font-size: 0.875rem; /* text-sm */
    font-weight: 500;
    color: #111827; /* text-gray-900 */
    margin-bottom: 0.5rem;
    line-height: 1.4;
}
.finding-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.75rem;
}
.finding-meta-left {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

/* Finding Category Badges */
.finding-category {
    display: inline-block;
    padding: 0.125rem 0.5rem; /* px-2 py-0.5 */
    border-radius: 0.375rem; /* rounded-md */
    font-size: 0.75rem; /* text-xs */
    font-weight: 500;
    text-transform: uppercase;
}
.finding-category-medical-condition {
    background-color: #dbeafe; /* bg-blue-100 */
    color: #1e40af; /* text-blue-800 */
}
.finding-category-medication {
    background-color: #dcfce7; /* bg-green-100 */
    color: #166534; /* text-green-800 */
}
.finding-category-anatomy {
    background-color: #fef3c7; /* bg-yellow-100 */
    color: #92400e; /* text-yellow-800 */
}
.finding-category-test-treatment-procedure {
    background-color: #e0e7ff; /* bg-indigo-100 */
    color: #3730a3; /* text-indigo-800 */
}
.finding-category-protected-health-information {
    background-color: #fce7f3; /* bg-pink-100 */
    color: #be185d; /* text-pink-800 */
}

.finding-page {
    font-size: 0.75rem; /* text-xs */
    color: #6b7280; /* text-gray-500 */
    font-weight: 500;
}
.finding-confidence {
    font-size: 0.75rem; /* text-xs */
    color: #4b5563; /* text-gray-600 */
    font-weight: 600;
}

/* Finding Action Buttons */
.finding-actions {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}
.btn-confirm, .btn-reject {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.25rem 0.75rem; /* px-3 py-1 */
    border-radius: 0.375rem; /* rounded-md */
    font-size: 0.75rem; /* text-xs */
    font-weight: 500;
    border: 1px solid;
    cursor: pointer;
    transition: all 0.2s ease-in-out;
}
.btn-confirm {
    background-color: #f0fdf4; /* bg-green-50 */
    color: #166534; /* text-green-800 */
    border-color: #bbf7d0; /* border-green-200 */
}
.btn-confirm:hover {
    background-color: #dcfce7; /* hover:bg-green-100 */
}
.btn-reject {
    background-color: #fef2f2; /* bg-red-50 */
    color: #991b1b; /* text-red-800 */
    border-color: #fecaca; /* border-red-200 */
}
.btn-reject:hover {
    background-color: #fee2e2; /* hover:bg-red-100 */
}

/* Finding Status Indicators */
.finding-status {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.25rem 0.75rem; /* px-3 py-1 */
    border-radius: 0.375rem; /* rounded-md */
    font-size: 0.75rem; /* text-xs */
    font-weight: 500;
}
.finding-status-confirmed {
    background-color: #dcfce7; /* bg-green-100 */
    color: #166534; /* text-green-800 */
}
.finding-status-rejected {
    background-color: #fee2e2; /* bg-red-100 */
    color: #991b1b; /* text-red-800 */
}

/* Empty State */
.findings-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem 1rem;
    text-align: center;
    color: #6b7280; /* text-gray-500 */
}
.findings-empty .icon {
    width: 3rem; height: 3rem;
    color: #d1d5db; /* text-gray-300 */
    margin-bottom: 1rem;
}
.findings-empty h3 {
    font-size: 1.125rem; /* text-lg */
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: #4b5563; /* text-gray-600 */
}
.findings-empty p {
    font-size: 0.875rem; /* text-sm */
    margin: 0;
}

/* --- 1. Universal App Background --- */
/* This sets a single, consistent background for all application pages. */
body {
    background-color: #f9fafb !important; /* bg-gray-50 */
    background-image: none !important; /* Override the login gradient */
}

/* --- 2. Attorney Dashboard Specific Styles --- */
.attorney-header {
    background-color: white;
    border-bottom: 1px solid #e5e7eb;
    padding: 1.5rem;
}
.attorney-header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.attorney-header-title {
    display: flex;
    align-items: center;
    gap: 1rem;
}
.attorney-header-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    background-color: #0d9488;
    border-radius: 0.5rem;
}
.attorney-header-logo .icon {
    width: 1.5rem; height: 1.5rem;
    color: white;
}
.attorney-header-content h1 {
    font-size: 1.5rem;
    letter-spacing: -0.025em;
    margin: 0;
}
.btn-outline {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border: 1px solid #d1d5db;
    border-radius: 0.375rem;
    background-color: transparent;
    color: #374151;
    cursor: pointer;
    text-decoration: none;
    transition: background-color 0.2s;
}
.btn-outline:hover {
    background-color: #f9fafb;
}

.attorney-main {
    padding: 2rem 1.5rem;
}

/* --- 3. Upload Card (This was correct, no changes needed) --- */

/* --- 4. Document List & NEW, SCOPED Card Styles --- */
.document-list-header {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
}
.document-grid {
    display: grid;
    grid-template-columns: repeat(1, 1fr);
    gap: 1.5rem;
}
@media (min-width: 768px) { .document-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .document-grid { grid-template-columns: repeat(3, 1fr); } }

/* NEW, specific card style for this page */
.attorney-doc-card {
    background-color: white;
    border-radius: 0.5rem;
    border: 1px solid #e5e7eb;
    box-shadow: 0 1px 2px 0 rgba(0,0,0,0.05); /* shadow-sm */
    transition: box-shadow 0.2s, transform 0.2s;
    display: flex;
    flex-direction: column;
}
.attorney-doc-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -2px rgba(0,0,0,0.1);
}
.attorney-doc-card-header {
    padding: 0.75rem 1rem;
    display: flex;
    gap: 0.75rem;
    align-items: flex-start;
}
.attorney-doc-card-header .icon {
    width: 1.25rem; height: 1.25rem;
    color: #6b7280;
    margin-top: 0.25rem;
    flex-shrink: 0;
}
.attorney-doc-card-header h3 {
    font-weight: 700;
    font-size: 0.875rem;
    line-height: 1.4;
    word-break: break-word;
    margin-bottom: 0.25rem;
}
.attorney-doc-card-header p {
    font-size: 0.75rem;
    color: #6b7280;
    margin: 0;
}
.attorney-doc-card-content {
    padding: 0.75rem 1rem;
    border-top: 1px solid #f3f4f6;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* --- 5. NEW Status Badge System --- */
.badge-status {
    display: inline-block;
    padding: 0.125rem 0.625rem;
    font-size: 0.75rem;
    font-weight: 500;
    border-radius: 9999px;
    border: 1px solid;
}
.badge-status-processing {
    background-color: #f3f4f6; color: #1f2937; border-color: #e5e7eb;
}
.badge-status-awaiting {
    background-color: #fef3c7; color: #92400e; border-color: #fde68a;
}
.badge-status-ready {
    background-color: #dcfce7; color: #166534; border-color: #bbf7d0;
}

.btn-disabled {
    padding: 0.25rem 0.75rem;
    font-size: 0.875rem;
    height: auto;
    width: auto;
    font-weight: 500;
    background-color: #f3f4f6;
    color: #9ca3af;
    cursor: not-allowed;
    box-shadow: none;
    border-radius: 0.375rem;
}

/* --- Upload Progress and File Management --- */
.drag-over {
    border-color: #0ea5e9 !important;
    background-color: #f0f9ff !important;
}

.files-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.file-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem;
    background-color: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 0.5rem;
}

.file-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex: 1;
}

.file-info .icon {
    width: 1.25rem;
    height: 1.25rem;
    color: #6b7280;
    flex-shrink: 0;
}

.file-details {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.file-name {
    font-weight: 500;
    font-size: 0.875rem;
    color: #111827;
}

.file-size {
    font-size: 0.75rem;
    color: #6b7280;
}

.upload-progress {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    min-width: 150px;
}

.progress-bar {
    flex: 1;
    height: 0.5rem;
    background-color: #e5e7eb;
    border-radius: 9999px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background-color: #0ea5e9;
    transition: width 0.3s ease;
}

.progress-text {
    font-size: 0.75rem;
    font-weight: 500;
    color: #374151;
    min-width: 2.5rem;
    text-align: right;
}

.upload-status {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    font-weight: 500;
}

.upload-success {
    color: #166534;
}

.upload-success .icon {
    width: 1rem;
    height: 1rem;
    color: #16a34a;
}

.upload-error {
    color: #dc2626;
}

.upload-error .icon {
    width: 1rem;
    height: 1rem;
    color: #dc2626;
}

.remove-file-btn {
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
    color: #6b7280;
    background: none;
    border: 1px solid #d1d5db;
    border-radius: 0.25rem;
    cursor: pointer;
    transition: all 0.2s;
}

.remove-file-btn:hover {
    color: #dc2626;
    border-color: #dc2626;
}

/* --- Notifications --- */
.notification {
    position: fixed;
    top: 1rem;
    right: 1rem;
    max-width: 400px;
    z-index: 1000;
    border-radius: 0.5rem;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    animation: slideIn 0.3s ease-out;
}

.notification-success {
    background-color: #f0fdf4;
    border: 1px solid #bbf7d0;
    color: #166534;
}

.notification-error {
    background-color: #fef2f2;
    border: 1px solid #fecaca;
    color: #dc2626;
}

.notification-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem;
    gap: 1rem;
}

.notification-close {
    background: none;
    border: none;
    font-size: 1.25rem;
    cursor: pointer;
    color: inherit;
    opacity: 0.7;
    transition: opacity 0.2s;
}

.notification-close:hover {
    opacity: 1;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}