/* --- Page Typography --- */
.page-title {
    color: #374151;
    font-weight: 700;
    font-size: 1.4rem;
    margin-bottom: 24px;
}

/* --- Main Sections --- */
.main-card {
    background: #ffffff;
    border-radius: 12px;
    border: 1px solid #E5E7EB;
    box-shadow: 0 1px 2px rgba(0,0,0,0.02);
    padding: 24px;
    margin-bottom: 24px;
}

.section-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: #374151;
    margin-bottom: 6px;
}

.section-subtitle {
    font-size: 0.8rem;
    color: #6B7280;
    margin-bottom: 24px;
}

/* --- Progress & Alert Cards --- */
.progress-title-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 8px;
}

.progress-title {
    font-weight: 700;
    font-size: 1rem;
    color: #1F2937;
}

.progress-percent {
    font-weight: 700;
    font-size: 1.25rem;
    color: #059669;
    line-height: 1;
}

    .progress-percent small {
        font-size: 0.7rem;
        color: #6B7280;
        font-weight: 500;
        display: block;
        text-align: right;
    }

.progress-text {
    font-size: 0.75rem;
    color: #6B7280;
    margin-bottom: 12px;
    font-weight: 500;
}

.text-green {
    color: #059669;
    font-weight: 600;
}

.text-red {
    color: #DC2626;
    font-weight: 600;
}

.progress-bar-thin {
    height: 6px;
    background-color: #E5E7EB;
    border-radius: 10px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background-color: #059669;
    border-radius: 10px;
}

.alert-card {
    background-color: #FEF2F2;
    border: 1px solid #FECACA;
    border-radius: 12px;
    padding: 20px;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

    .alert-card i {
        color: #DC2626;
        margin-right: 8px;
    }

.alert-title {
    font-size: 0.85rem;
    color: #7F1D1D;
    font-weight: 600;
    margin-bottom: 4px;
}

.alert-large-text {
    font-size: 1.1rem;
    color: #DC2626;
    font-weight: 700;
    margin-bottom: 4px;
}

.alert-desc {
    font-size: 0.75rem;
    color: #991B1B;
    margin: 0;
}

/* --- Specimen Signature Boxes --- */
.dl-box {
    background-color: #EFF6FF;
    border: 1px solid #BFDBFE;
    border-radius: 12px;
    padding: 32px 20px;
    text-align: center;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.dl-icon {
    width: 48px;
    height: 48px;
    background: white;
    color: #3B82F6;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin-bottom: 16px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.dl-title {
    font-weight: 700;
    font-size: 0.95rem;
    color: #1E3A8A;
    margin-bottom: 6px;
}

.dl-text {
    font-size: 0.7rem;
    color: #60A5FA;
    margin-bottom: 16px;
    max-width: 250px;
}

.btn-outline-blue {
    border: 1px solid #3B82F6;
    color: #3B82F6;
    background: white;
    font-size: 0.8rem;
    font-weight: 600;
    padding: 8px 20px;
    border-radius: 6px;
    transition: 0.2s;
}

    .btn-outline-blue:hover {
        background: #3B82F6;
        color: white;
    }

.up-box {
    background-color: #FAFAFA;
    border: 1px dashed #D1D5DB;
    border-radius: 12px;
    padding: 32px 20px;
    text-align: center;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: 0.2s;
}

    .up-box:hover {
        background-color: #F3F4F6;
        border-color: #9CA3AF;
    }

.up-icon {
    color: #9CA3AF;
    font-size: 1.5rem;
    margin-bottom: 12px;
}

.up-title {
    font-weight: 600;
    font-size: 0.9rem;
    color: #374151;
    margin-bottom: 4px;
}

.up-text {
    font-size: 0.7rem;
    color: #6B7280;
}

/* --- Document Cards --- */
.doc-card {
    border: 1px solid #E5E7EB;
    border-radius: 12px;
    padding: 16px;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.doc-header {
    display: flex;
    gap: 12px;
    margin-bottom: 16px;
}

.doc-icon {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    background-color: #ECFDF5;
    color: #10B981;
}

.doc-title-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    width: 100%;
}

.doc-title {
    font-weight: 700;
    font-size: 0.85rem;
    color: #1F2937;
    margin-bottom: 2px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.doc-desc {
    font-size: 0.7rem;
    color: #6B7280;
}

/* Badges */
.badge-group {
    display: flex;
    gap: 6px;
}

.badge-req {
    font-size: 0.6rem;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 4px;
    color: #DC2626;
    border: 1px solid #FECACA;
    background: #FEF2F2;
}

.badge-up {
    font-size: 0.6rem;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 4px;
    color: #059669;
    background: #D1FAE5;
}

.badge-miss {
    font-size: 0.6rem;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 4px;
    color: #4B5563;
    background: #F3F4F6;
}

/* File Action Boxes */
.file-uploaded-box {
    background-color: #F0FDF4;
    border: 1px solid #D1FAE5;
    border-radius: 8px;
    padding: 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: auto;
    gap: 12px; 
}

.file-info {
    display: flex;
    gap: 10px;
    align-items: center;
    min-width: 0; 
    flex: 1; 
}

    .file-info > div {
        min-width: 0;
    }

    .file-info i {
        color: #059669;
        font-size: 1.2rem;
    }

.file-name {
    font-size: 0.8rem;
    font-weight: 700;
    color: #1F2937;
    margin-bottom: 2px;
    overflow-wrap: anywhere;
    word-break: break-word;
    /* NOTE: If you prefer to truncate the text with "..." instead of wrapping, 
       remove the two lines above and use these instead:
       white-space: nowrap;
       overflow: hidden;
       text-overflow: ellipsis; 
       display: block; 
    */
}

.file-meta {
    font-size: 0.65rem;
    color: #6B7280;
}

.file-actions {
    display: flex;
    gap: 12px;
    flex-shrink: 0; 
}

.btn-action-text {
    background: none;
    border: none;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0;
    display: flex;
    align-items: center;
    gap: 4px;
    cursor: pointer;
}

.btn-view {
    color: #374151;
}

.btn-replace {
    color: #EA580C;
}

.file-missing-box {
    background-color: #FAFAFA;
    border: 1px dashed #D1D5DB;
    border-radius: 8px;
    padding: 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: auto;
}

.missing-info {
    display: flex;
    gap: 10px;
    align-items: center;
}

    .missing-info i {
        color: #10B981;
        font-size: 1.2rem;
    }

.missing-title {
    font-size: 0.8rem;
    font-weight: 600;
    color: #10B981;
    margin-bottom: 2px;
}

.missing-meta {
    font-size: 0.65rem;
    color: #9CA3AF;
}

.btn-green-solid {
    background-color: #059669;
    color: white;
    border: none;
    padding: 6px 16px;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
    transition: 0.2s;
}

    .btn-green-solid:hover {
        background-color: #047857;
    }

/* Custom Dropdown in Title */
.title-select {
    border: 1px solid #D1D5DB;
    border-radius: 4px;
    padding: 2px 24px 2px 8px;
    font-size: 0.75rem;
    color: #4B5563;
    background-color: white;
    display: inline-block;
}

.btn-upload-attach-Enclosure {
    border-bottom-right-radius: 6px;
    padding: 0 16px;
    font-size: 0.8rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
}

/* --- Responsive Adjustments for Mobile & Tablets --- */
@media (max-width: 768px) {
    /* Stack the title and the Required/Missing badges */
    .doc-title-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    /* Stack the file info and the action buttons */
    .file-missing-box,
    .file-uploaded-box {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    /* Make the upload button full width for easier tapping */
    .btn-green-solid {
        width: 100%;
        text-align: center;
        display: block;
    }

    /* Adjust uploaded file actions (View / Replace) */
    .file-actions {
        width: 100%;
        justify-content: flex-start;
        gap: 24px;
        padding-top: 12px;
        border-top: 1px dashed #D1D5DB;
    }

    /* Stack the progress bar text */
    .progress-title-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }

    .progress-percent small {
        text-align: left;
    }

    /* Adjust the Specimen boxes padding */
    .dl-box, .up-box {
        padding: 20px 16px;
    }
}